Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have 2 listboxes
1- Region
2- Domain ('Mops','WEB','Reports')
there is a possibility that user selects 2 fields from domain. each selection has a different output.
i have written the below if condition. however this fails since wildmatch acts as or and not if...
if(GetSelectedCount(Region)=0 AND GetFieldSelections(Domain)='MOPS',8.00,
if(GetSelectedCount(Region)=0 ANDWildMatch(GetFieldSelections(Domain),'*MOPS*','*Reports*') ,10.00,
if(GetSelectedCount(Region)=0 ANDWildMatch(GetFieldSelections(Domain),'*WEB*','*Reports*') ,13.00,
if(GetSelectedCount(Region)=0 ANDWildMatch(GetFieldSelections(Domain),'*WEB*','*Mops*') ,13.00,
Yousuf,
You need to watch spacing with QV, it can be tricky. You were missing a space and capitalization matters!
What about this approach:
wildmatch(GetFieldSelections(Domain),'*Mops,Reports*')
=if(GetSelectedCount(Region)=0 AND GetFieldSelections(Domain)='MOPS',8.00,
if(GetSelectedCount(Region)=0 AND WildMatch(GetFieldSelections(Domain),'*Mops*,*Reports*') ,10.00,
if(GetSelectedCount(Region)=0 AND WildMatch(GetFieldSelections(Domain),'*Reports*,*WEB*') ,13.00,
if(GetSelectedCount(Region)=0 AND WildMatch(GetFieldSelections(Domain),'*Mops*,*WEB*') ,13.00,0))))
Michel, has given the best and the optimised way to achieve these nested if logic.
Didnt work...
in the attched file i selected mops and reports. so theo output should be 10.but its showing 0.
Yousuf,
You need to watch spacing with QV, it can be tricky. You were missing a space and capitalization matters!
thanks a ton