• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Conditional filtering for a grid based on an App Variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditional filtering for a grid based on an App Variable

    Is there a built-in way to conditionally filter a widget to display only certain rows from a data source on startup, based on the value of an App Variable?

    I tried using a filter program, but it didn't seem to work. I thought using an initial value program could be a good way of doing it, but I don't want the user to have access to changing the filter, so I can't include any actual field filters in the NaB.

    Maybe the filter program is what i need, and i simply misinterpreted the documentation, but I couldn't get it to work no matter what I tried, so at this point, I'm pretty stuck.

  • #2
    I would suggest using vvIn_Virtual in the data source;
    Code:
    SELECT
      cusno
    FROM
      democmast
    WHERE
      vvin_virtual('myFilter', '1=1', 'char', 100, NULL, 'false')
    Then on the startup of your application you can set your app variable ("myFilter" in this case) to whatever clause you need for the WHERE condition.
    Last edited by robert.swanson; 04-03-2024, 01:29 PM.

    Comment


    • #3
      Oh, I didn't realize you could use an app variable for the entire where clause, that made things much simpler. Thank you!

      Comment

      Working...
      X