- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 08:32 AM - edited 01-25-2025 09:33 AM
So I have a catalog item with a mandatory multi-line text field on a task. When they type in that field, then save/update/or close task, the text is there until that task reloads and the field clears. How can I watch or debug this field to see what is clearing the text? Again, if you save, you can see the text then when the page fully reloads the field clears.
I have checked the following:
- No client scripts on this item are active that would clear that field
- No UI Policies are active that would "Clear field value"
- No Catalog Client Scripts in the entire instance touch that variable
- No Business Rules in the entire instance touch that variable.
- The field has no default value and is just a standard multi-line text field
It appears the field is getting erased "OnLoad" based on me being able to see it briefly on "Save" before the text disappears, but there isn't an "OnLoad" client script on this catalog item at all.
I have built over 200 catalog items in our instance and I am not sure what's going on here. How can I watch or debug this field to see what is erasing the text? I am almost to the point of making a new field and making this one inactive.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 05:13 AM - edited 01-27-2025 05:15 AM
So after a lot of looking into this, turns out there is a field on the UI Policy Action called "Value Action". Somehow that "Value Action" field, which I didn't even know existed, was set to "Clear Value". Of the 1,200+ UI Policy Actions I have built in our system, somehow this was the only one set as "Clear Value". I have no idea how that get set to "Clear Value", but at least it's fixed now.
If you navigate to the catalog_ui_policy_action table and add "Value Action" to the list view, you can see which ones have any value besides "Leave Alone".
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 09:35 AM
Hi @Steven Parker - Can you clarify the scenario? Is this a record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:55 PM
This is a catalog item for requesting something and the variable is on a task in the workflow.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2025 05:34 AM
You could add a simple onLoad client script. Keep in mind that client script execution order is determined first by the Order field and then alphabetically in ascending order. To ensure this client script runs before any others, try naming it # and leaving the Order field blank.
function onLoad() {
var fieldValue = g_form.getValue('<your_field_name>');
console.log('Field value onLoad:', fieldValue );
}
Additionally, you can use the browser console to determine which client scripts are running, and in what order. The console would look something like this:
[00:00:00.001] onLoad x
[00:00:00.001] onLoad y
[00:00:00.000] onLoad z
There are other options (e.g., enable auditing), but if you suspect it's something client side...this is a good start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 05:13 AM - edited 01-27-2025 05:15 AM
So after a lot of looking into this, turns out there is a field on the UI Policy Action called "Value Action". Somehow that "Value Action" field, which I didn't even know existed, was set to "Clear Value". Of the 1,200+ UI Policy Actions I have built in our system, somehow this was the only one set as "Clear Value". I have no idea how that get set to "Clear Value", but at least it's fixed now.
If you navigate to the catalog_ui_policy_action table and add "Value Action" to the list view, you can see which ones have any value besides "Leave Alone".
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven