Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The following expression works:
=WildMatch(OSUser(), '*abc') // this returns me -1 which is true
But when I try using the following expression, where UserPermitted has values *abc,*edf,*yfy. The expression below does not work
=WildMatch(OSUser(), (Concat(DISTINCT chr(39)&'*' & [UserPermitted]&chr(39) , ', '))) // this returns me 0, although it should return me -1
Please suggest!
It returns 3 because it matches the 3rd value. Why do you want it to return 1?
-Rob
WildMatch() cannot use a dynamic computed list in this fashion. You must use DSE to syntax to cause the parameter list to be built before the WildMatch() is evaluated. Try:
=WildMatch(OSUser(), $(=(Concat(DISTINCT chr(39)&'*' & [UserPermitted]&chr(39) , ', '))))
-Rob
Thank you for the response. It returns me a value of 3, but it should ideally return 1.
Note:The field UserPermitted has 3 values in it.
It returns 3 because it matches the 3rd value. Why do you want it to return 1?
-Rob
Would you share few values and then use expression then see
May be this
SubStringCount('|' & Concat(DISTINCT UserPermitted, '|,|') & '|', '|' & SubField(OSUser(), '\', -1) & '|')
I was under the conception that the function would just return 1. Thanks for the clarification
Thanks Sunny, this also works and is a correct answer. Wanted to mark your answer as correct too. But this website would not let me do it.
/**** This is also a correct answer ****/