How can I write field data to a custom table from a run script in Workflow Editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 08:41 PM
Hello,
I would like to know the best method to write fields to a custom table, using a run script within workflow editor.
Here is an example of my run script
Essentially,
The catalog task is created -> it gets completed (the new fields are filled out on the catalog task by the user) -> runs through the approval stage -> after approval, the fields that are filled out on the catalog task get written to a record on the custom table u_direct_enterprise_software
At the moment, I currently have all functionality working besides the fields writing to the record on the table.
They simply do not populate to the table and I do not know why.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 09:51 PM
Hello Justin,
May i know why you are using "cvar" instead of current.variables.xyz?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 10:18 PM
Hi Vishwa, I used this as a personal preference method,
However I am curious now.
Would using current.variables directly prove to be a different result?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 10:10 PM
Hi @Justin T
follow the correct approach for updating fields in a table based on user input from a Catalog Task. However, it looks like there might be a typo or misunderstanding in how you’re accessing the variables from the current record. The way you access catalog item variables should work correctly if current is indeed referring to the catalog task record, but it’s always good to confirm the context in which your script is running. Additionally, ensure that the variables are named exactly as they appear, paying close attention to any cases of potential typos (e.g., a single underscore in variable names within the script but not in the actual variable names).
Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards
Deepak Sharma