Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am attempting to use wildmatch and the getcurrentselections functions together to conditionally show/hide an object. The goal would be that if a selection was made on any field other than the ones below, an object is shown
Here is the equation I am attempting to use for the conditional show/hide (from the discussion here):
=if(Wildmatch(GetCurrentSelections(), $(=concat({< [$Field] =-{'[Discharge Department]','[MonthAbvYear]','[Attending Provider]', '[Location]'}>} chr(39) & '*' & [$Field] & '*' & chr(39),',')) )>=1,1,0)
The goal would be that if a selection was made on any field other than the ones above, an object is shown. It works fine for the Attending Provider and Location fields but for some reason does not work on the Discharge Department or MonthAbvYear fields. There are no differences between the 4 fields that I can tell that would cause them to behave differently. When I input just the '=concat(...)' function into a text object, the concatenated text looks correct. Maybe there's something going on with the wildmatch component?
Any help would be greatly appreciated!
Message was edited by: Al Makximenko
Try this
=if(Wildmatch('|' & GetCurrentSelections(', |', '|:'), $(=concat({< $Field -= {'Attending Provider','Location','Discharge Department','MonthAbvYear'}>} chr(39) & '*|' & $Field & '|*' & chr(39) ,',')))>=1,1,0)
Do you really need the square brackets around your fields? Have you tried this?
=WildMatch(GetCurrentSelections(), $(=Concat({<[$Field] =-{'Discharge Department', 'MonthAbvYear', 'Attending Provider', 'Location'}>} Chr(39) & '*' & [$Field] & '*' & Chr(39), ',')))
or this
=If(WildMatch(GetCurrentSelections(), $(=Concat({<[$Field] =-{'Discharge Department', 'MonthAbvYear', 'Attending Provider', 'Location'}>} Chr(39) & '*' & [$Field] & '*' & Chr(39), ',')))>=1, 1, 0)
Thank you for the reply. Yes, I've tried with the brackets and without but unfortunately I get the same results either way.
How about this
=WildMatch(GetCurrentSelections('|', ': ', ',', 500000), $(=Concat({<[$Field] =-{'Discharge Department', 'MonthAbvYear', 'Attending Provider', 'Location'}>} Chr(39) & '*' & [$Field] & '*' & Chr(39), ',')))
or this
=If(WildMatch(GetCurrentSelections('|', ': ', ',', 500000), $(=Concat({<[$Field] =-{'Discharge Department', 'MonthAbvYear', 'Attending Provider', 'Location'}>} Chr(39) & '*' & [$Field] & '*' & Chr(39), ',')))>=1, 1, 0)
I tried the above and am still getting the same results.
Would it be possible to share a sample where you can replicate your issue?
I've attached a sample above.
Try this
=if(Wildmatch('|' & GetCurrentSelections(', |', '|:'), $(=concat({< $Field -= {'Attending Provider','Location','Discharge Department','MonthAbvYear'}>} chr(39) & '*|' & $Field & '|*' & chr(39) ,',')))>=1,1,0)
Works like a charm, thank you!