- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 10:01 AM - edited 06-07-2024 10:08 AM
Hello,
I need to map variables to description on Catalog Task but I tried using scripted option but keeps erroring out. What is the syntax for this. Any assistance is appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 09:15 PM
Hi @purdue could you please also check the semicolon at the line 3. I missed it. it should be like below
var desc = [];
Let me know if it is working or will find another solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 07:59 AM
If that's the case, then, of course, g_form won't be recognized since your flow is running on the server and g_form is a client side object. You probably need to replace g_form with whatever name you gave the requested item record when calling the action.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 07:03 AM
Hello @purdue ,
Could you please something like this??
var desc = []
desc.push(fd_data.1__get_catalog_variables("requested_for));
desc.push(fd_data.1__get_catalog_variables("manager));
desc.push(fd_data.1__get_catalog_variables("title));
return desc;
Mark this as helpful if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 07:40 AM
Will this fix the issue of populating the display value of selectbox?
Thanks,
Chad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 07:53 AM
Hello @purdue ,
To get display value of the variable, please user .getDisplayValue(). Since we are pushing everything in array and returning the array, it should work.
var desc = []
desc.push(fd_data.1__get_catalog_variables("requested_for).getDisplayValue()); //example for displayvalue
desc.push(fd_data.1__get_catalog_variables("manager));
desc.push(fd_data.1__get_catalog_variables("title));
return desc;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 10:39 AM
Getting this error.