Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a Company Adress table where i have a Special Grouping (relation) ID so i can select all related companys at once.
But not all Adress-Sets have them (private Customers, ...)
The Problem is, because it's an App for our Field Service, they have limited access or Analysis selection fields.
First they need to select a Company (search) and then they can to some basic Analysis / Selection.
Now i have a button( Show all Customers with SpecialGroupID xxx) what should show up when a Company has one
i have made These Actions: (Sorry i have german version, so i can only translate from german to english)
*) Clear Entire Selection
*) Selection in Field: Field: SpecialGroupID Search:SpecialGroupID
It works so far but:
i only want have that button active when there is a SpecialGroupID available.
With that code:
if(GetPossibleCount(ADRESS.SpecialGroupID) = 1,1,0)
and (COUNT(TRIM(ADRESS.SpecialGroupID)) > 1)
when i select a Adress who has no ID (is empty or has empty strings in it) .. it also shows up and when i click it, i get all Adress-Sets with "Nothing" in the SpecialGroupID.
Thank you for your inspiration and any little hint.
Nachricht geändert durch Markus Gombocz
update your condition like this :
if(len(trim(ADRESS.GroupID))>0,Count(Trim(ADRESS.GroupID)))
i.e.
=If(GetPossibleCount(ADRESS.GroupID) = 1 and if(len(trim(ADRESS.GroupID))>0,Count(Trim(ADRESS.GroupID))) > 0, 1, 0)
this will do
Not exactly sure where you are using this, but may be this:
=If(GetPossibleCount(ADRESS.SpecialGroupID) = 1 and Count(Trim(ADRESS.SpecialGroupID)) > 0, Something, SomethingElse)
Your Scripts works, but when i select an Adress-Set which has an emtpy String SpecialGroupID ..i select ALL empty .. which i do not want. I only want to Select all related Sets if there is a valid ID.
(i use that script in "condition for availibility" on a button)
=If((GetPossibleCount(ADRESS.SpecialGroupID) = 1 and Count(Trim(ADRESS.SpecialGroupID)) > 0), 1, 0
can you please share your app, so that we can check the same.
i've uploaded a clean version.
i dont want the button be active when Mr.Private is active (because they have no group id).
i hope this explains my error a little bit.
Thanks
update your condition like this :
if(len(trim(ADRESS.GroupID))>0,Count(Trim(ADRESS.GroupID)))
i.e.
=If(GetPossibleCount(ADRESS.GroupID) = 1 and if(len(trim(ADRESS.GroupID))>0,Count(Trim(ADRESS.GroupID))) > 0, 1, 0)
this will do
Something seems off about the if statement. Can't really open the qvw file, so not sure what is the intended use. Can you check if the if statement is right:
=If(GetPossibleCount(ADRESS.GroupID) = 1 and if(len(trim(ADRESS.GroupID))>0,Count(Trim(ADRESS.GroupID))) > 0, 1, 0)
Update: My bad, I understand it now
. My apologies for the confusion, I wish I had a licensed version of QV
Thank you, now it works.. the len() did it!
@
I think you wanted to mark Avinash's answer as correct answer, but marked mine as correct
. Please reward him for providing you the correct answer.
Best,
Sunny
Yeah, i undid it, thanks! ![]()