- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 09:21 AM
I have a Catalog Item that 3/4 parts of an equation will be filled out at time of submission, and the last 1/4 completed after submission.
When that last 1/4 is filled in, a calculation needs to run to fill in another variable (let's call it Score).
Due to how the fulfilling group will be working these, it's not really feasible to handle this in the workflow. They need the freedom to have this calculation rerun whenever needed.
That being the case, what I thought I could do was:
1-Setup a before BR on the Variables table that on update would run a script to update the related RITM (just update some field to cause the RITM to be updated)
2-Have a BR on the RITM that would perform the calculation for the appropriate variables and update the Score variable
The issue is, I don't want the BR for #1 to update the RITM for every variable updated, if multiple are changed at the same time. Is there a way to prevent that? Getting this mechanism setup to do a single update to the RITM from variables could prove useful into the future.
I'm also open to alternate suggestions for how to handle this. I know a UI Action would likely work but that would be manual (and a one-off solution). 😉
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 11:29 AM
Hello,
I believe it goes work, when the variables are updated. If you change a variable, the RITM is still updated when a variable is updated from within.
Updating a variable:
Either way, you have a few methods, but the point is, you can run a BR on update of a particular RITM if those fields contain a value. The script will run to calculate and go from there.
Otherwise, as I mentioned wayyyyy back in my original post when first replying to your question...you can use onChange client scripts.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 02:19 PM
Yes, it does. On Change will work on all the variables in variable editor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 10:53 AM
Hi,
Then you could make 1 simply BR on the sc_req_item table using the "variables" related field for your specific item, and specific variable.
So you could do 1 BR with 4 "or" conditions...
That can calculate it whenever one contains a value and the RITM is updated and upon saving the record would get it's score calculated. You don't need a BR on the variables table and doing things all complicated that way. Variables are accessible in BR from the sc_req_item, per catalog item, and per variable.
Or...as mentioned above, if you want it calculated in the moment, you'd want to use onChange client scripts.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 11:15 AM
I don't think the BR would trigger when the Variables were updated, because the RITM won't be updated. Unless that's changed in recent upgrades.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 11:29 AM
Hello,
I believe it goes work, when the variables are updated. If you change a variable, the RITM is still updated when a variable is updated from within.
Updating a variable:
Either way, you have a few methods, but the point is, you can run a BR on update of a particular RITM if those fields contain a value. The script will run to calculate and go from there.
Otherwise, as I mentioned wayyyyy back in my original post when first replying to your question...you can use onChange client scripts.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 11:42 AM
I'll give some things a try and see what works best.