- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 05:23 AM
Hi Team,
I have field named Category which is a reference type field, referencing table contains two fields: Category and Plant. I have another Field called Plant Name in the current table, it is also a reference type field. By selecting the plant name, I need the records for category in which the selected plant name matches with the Plant which is there in Category table.
Current Table:
Category Table:
Is there any suggestion, how to achieve this?
Thanks,
Yesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 09:59 PM
Hi
Please create a new script include with the following function, also make sure its client callable:
getCategory: function(plant) {
var refQuery = '';
refQuery = 'category=plant';
return refQuery;
},
After this, use advanced reference qualifier and use the below code for calling your script include:
javascript: yourScriptIncludeName().getCategory(current.variables.plantName);
However, if its a scoped application, then you will have to append the application name before yourScriptIncludeName() in reference qualifier
Note: Make sure that you change the variable name as per the name in your system.
Mark as correct if helpful!
Thanks,
Nikhil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 08:56 PM
Hi Rahul,
I have tried using the script you have given. It is not returning any records.
Thanks,
Yesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 09:46 PM
Can you please share field name in form and field name in the table?
Regards,
Rahul
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 09:48 PM
Both are u_plant only.
Regards,
Yesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 10:20 PM
Try using,
javascript:"u_plant=" + current.variables.u_plant;
Regards,
Rahul
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2022 10:32 PM
Hi Rahul,
I have tried it. It is not even returning a single record.
Thanks,
Yesh