[App Form] Use C Code Set Selection for Business View in Grid



Good afternoon!
Set User Selection for Business View in Grid use a C-code (Create a BSFN C)

"Set Selection(FC Grid, "F4801", "AN8", <Equal To>, FC Address Number, <And>)"


>>How to Set User Selection a Grid use C Code

Thanks in advance...
First of all, your terminology is a bit off. That line of code you're using is what is called a 'system function'. That is not to be confused with the term 'business function', which is c-code.

On to your question... If you let the List know what you're trying to accomplish, we may be able to guide to the best option. I say this because based on the picture you pasted, using a system function to do what I think you're trying to do, is not the best way.

In general, when you want to use that system function on forms, do the following:

  • In the Find button - Pressed Event:
    • Do a Set Selection Append(<Yes>) system function (if you want to include any/all filter fields... <No> otherwise)
    • Do all your required Set User Selection system function calls
  • In the Find button - Post button pressed:
    • Do a Clear User Selection system function

If you're just playing around and trying to figure out how these things work, that is fine, play away and learn!

If you are actually trying to create a form that queries on the AN8 field of F4801, make the FC Address Number field a filter field (In field properties). This is a very common practice for forms. No need to make it any more complicated than it needs to be.

Good luck.