Onchange of two variables in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 02:54 AM
Hello
Is it possible to write catalog client script when onchange of two variables ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 03:08 AM
Hi @Community Alums
No, you can't. You need an onChange client script for each field. You need to have individual client scripts for each of your variable.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 03:09 AM
Thank you for the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 03:11 AM - edited 03-11-2024 03:49 AM
Hi @Community Alums,
An onChange script is based upon and associated to a single field. If two (or more fields) need to be watched or monitored, additional Client Scripts are required.
Depending on your requirement, please take a look at and explore the use of UI policies where you have the ability to configure multiple conditions. Here you may be able to capture your requirement and monitor different values but sadly you won't be able to get the previous value or the 'changes to' / 'changes from' condition.... it really depends on your requirement.
However, in order to answer your question directly - high level, whilst you can reference multipole fields and within the script body of an onChange script, the script itself is associated to and 'watches' a single field.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 03:15 AM
Hi @Community Alums ,
One change client scripts run on fields which are selected in > 'Onchange' field of client script form. So here we cannot select 2 field at once. Hence its not possible...
you need to create 2 different onchange client scirpts for each field. i hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....