Hello!
I have a canvas app with 2 screens. Screen 1 is dashboard with gallery, and Screen 2 shows a datatable based on the item that was clicked on Screen 1. I have around 5 datatables. On Screen 2, I have a function that should update the selected row from the datatable (which is connected to sharepoint lists). I do this by passing the tableName.Selected.ColumnName to a variable which I set on the OnVisible property of Screen 2. I used a condition that if the table is visible, then set that value to the variable. This variable is then passed to a flow that will update my sharepoint list. Now, this works when I'm on Edit mode in the app. I don't encounter any errors.
My problem is, when I "Play" the app, or when it is initially loaded from the Apps list, I encounter an error that the flow has failed. "The method 'Run' has an invalid value for parameter 'number'. Upon investigation, I realize that this is caused by the variable that I'm passing to the flow. And when I did more testing, the app works fine when I try to visit or click each item on the gallery in Screen 1 then showing all the different tables first before I click the update function.
I think that the variables are not setting right away on the initial load that it's sending an empty value to the flow? Has anyone encountered the same? I would appreciate any help. Thanks.