When I start the App and open the debug I see there are a list of error's
As i understand it, ReRool is traying to run the "Update_itemOrgDescription" before I have triggered this with a event. Why and how do I stop the App to return errors?
I have some tables multiple tables.
Tab 1
dropdown selection.
table 1 is using where {{dropdown.selectedItem.value}}
table 2 is using where {{table1.selectedRows[0].id}}
table 3 is using where {{table2.selectedRows[0].id}}
formtable3 Data source {{table3.selectedRows[0]}}
text field "Description" is pupulated with data using from data key
with a event handler
update query: "Update_itemOrgDescription"
Note that I'm a new beginner and I greatly appreciate your help.
Hi @Thore - I also experienced this. My way of resolving this is by fixing each occurrence by slightly adjusting the code.
For example, if dropdown.selectedItem may be undefined sometimes then adjust code like {{dropdown.selectedItem.value}} with something like {{dropdown.selectedItem && dropdown.selectedItem.value}}
If you examine the state of the update query, do you see anything that triggers it? There might be a (convoluted) path that is causing it to run, including a trigger somewhere that runs when the app opens (via a success event, perhaps).
I think you want to make use of the Only run when field
for the value, you only want the this event to run when the variable js is complaining about is not null. so something like: {{ dropdown.selectedItem?.value != null && dropdown.selectedItem.value.length > 0 }}. by putting this in the Only run when area you're saying:
IF all of the following are true
dropdown.selectedItem exists
AND
dropdown.selectedItem.value is not null
AND
dropdown.selectedItem.value is not empty (empty string and empty array)
according to the error, somewhere in Update_Status you reference StatusId. Wherever you're using this in the Update_Status query it'll probably look like Get_Status.data.StatusId or something similar, try changing this to Get_Status.data?.StatusId and myVariable.value?.StatusId (@preshetin explained the reason for this above, but if you need more details or something just ask)
I had to guess with the 'Get_Status' name from the error message so that may be WAY wrong, just so you know before you copy/pasta it
edit: let me know if Update_Status doesn't reference StatusId at all (I may have read the call stack trace backwards
if status.selectedItem is 'null' or 'undefined' then {{status.selectedItem?.StatusId}} evalutes to 'null'. if the field that starts w 'fIdSpirStat' is not nullable and must be a string or something you can use {{ status.selectedItem? "my fallback value" : status.selectedItem.StatusId }}
As this is only when you start the App that I was getting the errors.
It looks like the use of "?" removed all my errors.
So I have solved my issue even if I don't understand that this was a issue at the first place (new beginner) as no user as trigger the update query to run yet.