- 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 08:19 AM
yea, cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 06:44 PM
Hello Anurag,
The script is working but I need a solution which is not specific for one or two locations. There are multiple requested for user locations and multiple assignment groups respectively.
Can you please suggest something with gliderecord?
I can get requested for user location directly through fd.data .
Then I need to glide record assignment group and match the name with user location data using contains or like or many other methods.
Then populate this in assignment group.
Is it possible to achieve and how?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 02:20 AM
Hi Harsha,
Thanks for accepting my solution.
I'd suggest start a fresh thread, show your sample data you are fetching and comparing from, and then you will get the help. Add all the information you can in the question an tag me if you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 06:57 AM
Hi @Harsha34 ,
You can check the below script.
var str = 'abcdNoidaefg';
var substring = 'Noida';
if (str.indexOf(substring) !== -1) {
gs.info(substring + ' is present in the string.');
} else {
gs.info(substring + ' is not present in the string.');
}
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 07:07 AM
Hi Mohd,
This was an example that I gave.
I need assignment group to populate with the respective location group if requested for location contains Noida respectively.
Please suggest.
Thanks,
Harsha