- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 06:37 AM
Hello everyone,
@Ankur Bawiskar if you can please help on this.
I am trying to populate assignment group of catalog task based on RITM requested for location through flow designer.
The script is working fine with indexOf but this might not give correct results if required text e.g Noida or Chennai is at last or in middle position of location .
Below is the one that I used in script of assignment group of flow designer:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 07:08 AM
Its not complicated, it will work like contains search only.
Just use this
if (locations.toString().toLowerCase().indexOf("noida")>-1|| locations.toString().toLowerCase().indexOf("chennai")>-1 )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 07:42 AM
Ohk great then I will try this and confirm you soon. Thanks a lot for your help, I’ll update you by tomorrow if it works or not.
Thanks,
Harsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 07:54 AM
Will it check for Noida or Chennai in lower case only ? Most of the locations are with initial letter in bold.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 07:58 AM
I have converted it to lower case we we should be good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 08:02 AM
We cannot modify any of the location names or any other foundation data.
So if we would have used contains or like something like this then the case sensitive concern would have gone.
Am I right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 08:05 AM
This will work like contains query and case is also managed.
You can try it and let me know if it doesn't work.
Also I see you have marked your won response as correct, was that by mistake?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 08:13 AM
Yes, apologies it was by mistake 🙁but I hope this would work. I’ll let you know soon.
Thanks,
Harsha