Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I used the following query to load data from SQL server into my QV app and would like to make this query dynamic using variables for the number in red and bigger font without reloading the data.
Select ID, a.field1, a.field2, a.field2,
case when a.field1 >2 then 1 else 0 end as BlnA
, case when a.field2 >0 then 1 else 0 end as blnB
, case when a.fiedd3 <5 then 1 else 0 end as blnC
from Table1 a.
Ideally I want users to make selection in the front end in order for them to explore the possibilities.
I think it might be done in LOAD section by creating new dynamic data fields. I have no clue now and really need experts' input.
Thanks
Longmatch
Use expressions in your front end objects in combination with variables. You can use input boxes to let users change the values of the variables.
Variables:
vThreshold1: 2
vThreshold2: 0
vThreshold3: 5
Expressions:
BlnA: =if([a.field1]> $(vThreshold1),1,0)
BlnB: =if([a.field2]> $(vThreshold2),1,0)
BlnC: =if([a.field3]< $(vThreshold3),1,0)
Use expressions in your front end objects in combination with variables. You can use input boxes to let users change the values of the variables.
Variables:
vThreshold1: 2
vThreshold2: 0
vThreshold3: 5
Expressions:
BlnA: =if([a.field1]> $(vThreshold1),1,0)
BlnB: =if([a.field2]> $(vThreshold2),1,0)
BlnC: =if([a.field3]< $(vThreshold3),1,0)
Your solution works just fine. Thanks.
Is there any way I can generate a new field at record level based upon user's input without data reloading. For example, use FOR LOOP in memory. Is this possible?