client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:02 AM
Hi
if i select one value from reference field then the two fields in the refrence field table values should be populate in the present table two fields. How can i achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:05 AM
Is this for a catalog item on the portal, or in the backend?
In both cases you will need a client script to get the values from the reference table to fill on the form, but the setup is a bit different.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:13 AM
In the backend form i am trying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:12 AM - edited 03-12-2024 02:33 AM
@shivaadapa , we can do this via client script
using get reference with callback function , I have added sample script for you
function onChange(control, oldValue, newValue, isLoading) { var userObject = g_form.getReference('requested_by', doAlert); // doAlert is our callback function } function doAlert(userObject) { //reference is passed into callback as first arguments g_form.setValue('department', userObject.department); }
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:15 AM
I am trying in the backend form. can we use other than getreference?