Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I had three fields they are Group,Min,Max from one table. I had taken Group as field in the listbox,Min & Max as expression in same listbox like followin image:
- Now i want to store Min value of A in one variable and Max value in another variable after marking A
- If i select B i want to store Min value of B in one variable and Max value in another variable.
The four variables are like this vMInA,vMaxA,vMinB,vMaxB.
How to solve this problem
Hi,
For vMinA Assign this value '=min({<Group= {"A"}>}MinCure)
For vMaxA Assign this value '=max({<Cure = {"A"}>}MinCure)
Use same thing for vMinB and vMaxB
Regards,
Kaushik Solanki
Hello,
Go to the Settings menu, Document properties, Triggers tab. Select the fields event and make a new action OnSelect and OnChange, External, Set Variable, select your variables and set the values using Min() and Max() functions.
Hope that helps.
BI Consultant
Hi,
For vMinA Assign this value '=min({<Group= {"A"}>}MinCure)
For vMaxA Assign this value '=max({<Cure = {"A"}>}MinCure)
Use same thing for vMinB and vMaxB
Regards,
Kaushik Solanki
kaushik,
But after selecting A it should assign a value to variable.
For eg:
1. if i select A then vMInA should hold the value 2 and vMaxA should hold the value 6. If it is unselected then vMinA,vMaxA should empty.
2. if i select B then vMInB should hold the value 1.58 and vMaxB should hold the value 1.65. If it is unselected then vMinB,vMaxB should empty.
Miguel,
Your logic is good. But when i unselect the variable should be empty and one more think is what about vMinB variable
Hi,
Ok try this.
for vMinA '=if(wildmatch(GetFieldSelections(Group),'A''),min({<Group= {"A"}>}MinCure),0)
Like wise use for other variable too.
Regards,
Kaushik Solanki
Hi,
Thanks kaushik it's working...
Can you please solve the solution of last two posts in this link :- LastTwoPosts
Hi,
Can you please mark this post as answered.
Regards,
Kaushik Solanki
Hi jagannalla,
just adding a note:
If you want a multiselect (like in your screenshot in OP), you need to use wildcards for the wildmatch (i.e. wildmatch(GetFieldSelections(Group),'*A*') or use index function instead.
(Group names must be unique even in part then)
swuehl,
Yeah..dat's good idea thanks for giving information buddy.
Hi ,
vMinA =if(wildmatch(GetFieldSelections(Group),'A''),min({<Group= {"A"}>}MinCure),'')
The above code is not working when i select A & B in the listbox at a time...