How to pull data of a custom table in the catalog item variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 12:55 AM
Hello everyone,
I have created one table with following fields:
User ( reference to sys_user), Total Leaves, Taken Leaves, Remaining Leaves and also created some records for this table
Then, i have created a catalog item with few variables in which there are all the above fields of my custom table also as variables
Now , requirement is that whenever any user logs in , his userID should get auto populated in user variables and the all three variables of leaves which are Total Leaves, taken leaves and remaining leaves should get auto filled fro my custom table
Hope you guys got my question, please help me out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 01:05 AM
Hi Akshay,
To achieve this you need a onload client script which will call a script include to fetch the data from backend and populate it on front end.
or
You can put below statements : javascript:gs.getUser().getRecord().getValue('phone_number'); in the default value tab of that respective variable.
Let me know if you need help with the script.
Kindly mark helpful if this answer helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 01:12 AM
Hi
Refer to the script mentioned in this thread , should help you :
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 10:16 PM
Hi
Any update to this ?Any follow-up required? if not
Kindly mark the answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep