populate catalog item variable value to 'xxx' if order guide variable checkbox is set to true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 07:15 AM - edited 06-02-2023 07:27 AM
I have a requirement when i set an checkbox to true from order guide (describe needs section) it will add a item in choose option section so now i need to populate a value to a variable under that specific item to "xxx" only when an specific checkbox is set to true. Is it possible ? if yes how.. please mention in detail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 08:00 AM
Order guide is technically used to just help user with ordering certain items, so the variables aren't really readily
For this you can create hidden helper variables, but do avoid creating too many since they can cause confusion.
For example.
You want to populate a variable to XXX on catalog item when specific checkbox is set to true on order guide?
In the order guide you can create the same variable as on catalog item and create a UI policy that hides it.
Now you'll also add a client script. If the checkbox is set to true, then our new variable is set to the value XXX.
When you move to the second step that value will be pre-filled on the catalog item from your order guide even if you don't see the variable in the order guide.
Just make sure to add a condition to empty the variable as well if the checkbox is set to false, so that you don't accidentally set the value on the catalog item.
You could also do this on the catalog item level.
Simply create the checkbox from the order guide into the catalog item and hide the field.
If the value is set to true then use client script to set your field to XXX.
The important thing is that there's a field that matches between the order guide and the catalog item so that they can share information when order guide has "cascade variables" enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2023 11:19 AM
Yup that helps but here I have a roadblock I have did that and the value is getting populated but I have a onchange client script running on that particular field in catalogue item which checks whether the value entered is valid or not , so now the value from order guide is getting populated but the onchange script doesn't works .Can u suggest any solution for that. I want that onchange script to run once the value is populated