Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
i have the following table
| Client | Charts |
|---|---|
| A | 1,2,3 |
| B | 1,2 |
| C | 1,3 |
The string within the charts-field refers to the charts that should be visible per client.
So for chart one i want to have a conditional show if the value 1 is present in the string.
chart two for value 2
chart three for value 3 etc.
what is the most effective way to identify if a value is part of a larger string?
your help would be much appreciated.
Kind regards,
Peter
Just add in your delimiter to ensure the proper match?
Index([Your string here]&',','1,')>0
Index([Your string here]&',','11,')>0
Edit: need to add the comma at the end to make sure last one is picked up
Hi Peter,
Index should do the job for you
Index([Your string here],'1')>0 for instance
hope that helps
Joe
if ( index ([Charts] , '2' ) > 0 , .......................
Hi Pete
U can use Match(), Mixmatch() or WildMatch() depending on the way u wanna search your string. All 3 can be found I the help menu.
/ Teis
Thanks but it is not the complete solution.
Because the string can go up to 11,12, etc. So with the following string: 3,8,11 it will still identify '1' in '11'.
Just add in your delimiter to ensure the proper match?
Index([Your string here]&',','1,')>0
Index([Your string here]&',','11,')>0
Edit: need to add the comma at the end to make sure last one is picked up
thanks Joe!
I only needed a comma at the start to or else it will still identify '1,' in '11,'
so now it is:
Index(','&[Your string here]&',', ',1,')
Index(','&[Your string here]&',', ',11,')
Try 1s and 0s.
A 111
B 110
C 101
And then use string functions like mid() to determine.
BR
Serhan
good point sorry yea forgot that one!