Catalog Client Scripts: accessing data on Target Record for qualification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 01:22 PM
We have a record producer creating a Change Record. We have some variables that need to be seen on the Change Record but those fields are determined by a value on the Change Record itself.
How can we set up the Catalog Client Script to look at data from the parent table so we can check to see if we need to hide some of these fields based on the Change Record data itself?
Second question: some of these variables are hidden on a variable set, with its own client scripts. Which runs first, the catalog client script at the Target record level or the catalog client script in the variable set level?
Third question: can catalog client scripts (including those at the variable set level) accept g_scratchpad variables?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:09 PM
Hi @tahnalos - Can you clarify the use case? It's not clear to me what you mean by "We have some variables that need to be seen on the Change Record but those fields are determined by a value on the Change Record itself."
2: By default, the catalog item's onLoad scripts execute before those on the variable set. However, you can control the execution order by setting the order value on each script. If the order values are identical, I think the catalog item's onLoad scripts will run first.
3: Yes, you can use g_scratchpad in catalog client scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:30 PM
Hi Sheldon
For the first case, the use case is as follows: we use a category field in the Change form and the use of some of our catalog variables depends on the value of the category field. So I want to use a catalog client script that would hide some of the catalog variables depending on the value of the Category field.
Hope this helps.