Hello. I have record and field. This field contains 1, 2, 3 or 4 location code filters. For example:
WHITE
WHITE|GREEN
WHITE|GREEN|RED
WHITE|GREEN|RED|BLUE
What is the most optimal (and simplest) way to check if number of location code filter is greater than 1?
I do this task in this way:
FilterTemp: Text
FilterTemp := Record.GetFilter("Location Code");
if FilterTemp.contains('|');
But im not sure that this is good way.
And how can I count number of Location Code filters in this example? I think I can count '|' in FilterTemp and result+1 will be correct answer. But maybe exists easier way?
Hi, just adding some info.
If only '|' is considered, I think a bug will occur.
In fact we can also use "..." to filter the Location Code.
For example,
EAST..OWN LOG
Hope this helps as well.
Thanks.
ZHU
CIao
you can use the following function
learn.microsoft.com/.../text-split-list[text]-method
check my answer if it was helpful, thanks
DAniele
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,101 Super User 2024 Season 2
Martin Dráb 229,908 Most Valuable Professional
nmaenpaa 101,156