Open manoharraon opened 5 months ago
Hey @raomanohar thanks for your report. I just created a Supabase table with a Column of type List
Then I added a button on the page, added an action to Update Page State, selected my "comments" variable, selected Set Value, and selected my Row and the appropriate Row Field.
This seems to work correctly. Please let me know if you are trying anything else here, or if my solution was helpful.
Have a great day!
@ignalauret Could you please create a backend query in the action flow editor itself which returns the single row via a variable as shown below instead of making a backend query on the page then try to store the query output column value into the app state variable(not sure if it makes a difference but yeah please try an app state variable instead of a page state variable) When i select the action flow output to set the variable value I get the below options
I see, the issue you are facing is because you are expecting the UserQueryOp to be only one item. Although YOU know that the result of the query will be only one document because you filtered by id, the editor doesn't know that, so the type of the result would still be a List of Rows, not only one Row.
So, what you are seeing there on the second image are the Available Options you can perform on your List of Rows that the Query returned. From there, you need to implement the logic to get the element you just queried and perform the corresponding actions (like save it to a App State Variable).
Hope I was clear enough to explain why there is no bug here. If you need any more help, please feel free to contact our Customer Support team, they will be able to give you much more help than me. Have a great day!
apologies on the delayed response @ignalauret Well I understand the Query response returns a list of lists so the editor doesnt understand that the value is single. Now accordingly when I set value to a string variable I can use the below logic to assign the o/p to the variable. However, when the app state variable is a list, the available options doesnt even have Item at index please see below. Now Irrespective of what logic I apply from the available option it just doesnt let me assign a list to list.
This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.
still looking for an solution kindly help
This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.
@ignalauret any update on this?
Hey @raomanohar I'm sorry for the late response. Please let me know if you were able to figure it out, or if you would like me to review it again.
@ignalauret unfortunately not. i would be grateful if you could please help with that
Hello @raomanohar !
First of all, I apologize for the delay in our response. We are working to improve our support so you can continue with your development smoothly.
On another note, could you please provide a Bug Report Code from the page of your project where you are experiencing this issue? This will help us investigate further.
Thank you for your understanding.
Best regards, Azanello
I'm having this exact same issue, but it is not related to Supabase only. This is a Flutterflow feature (or the lack thereof). You can't extract a list within an item inside a list. Flutterflow doesn't let you get into the item in the list to extract the field with the list; it assumes by default that there are no lists inside.
The only workaround would be to create a custom action that extracts the first item of the list and then use it normally. However, this isn't a very good solution since you are duplicating the data. I suppose it depends on how many times you are planning to make that query.
Hey sabatage3!
Could you please create a new issue here on GitHub describing this situation and replicating it from a blank project? This will help us look into it and prioritize it accordingly.
Thank you!
@Alezanello there is no bug as such. As sabatage3 mentioned Flutterflow does not let us extract values from a list. All I am looking for is assigning a list value to an app state variable which is also of type list.
Hello!
I would like to take a deeper look into your project to better understand and replicate the issue. For that, I need you to generate the bug report code as shown in the image I sent the other day.
Please generate the bug report code on the page where you need assistance. This will allow me to review the logic of how you are calling and assigning the list.
Hello,
I was able to replicate the issue and now understand your goal better and the frustration of not being able to achieve it. I'll forward this to the engineering team to address it, but in the meantime, I've found a workaround that might help. It's a bit tricky, but I'll explain it step by step.
This solution works if the query result from Supabase is a single row. If it’s a list of rows, a more complex workaround is needed, but it’s still achievable. Let me know if this works for you.
Set the Loop Action condition to "Counter is Less Than" and for the second value, select the List Variable of your Supabase Query Result, then select "Number of Items."
In the "Values to add," go to the List of Strings of the query result, select "Item at index," then "Specific Index," and set the index value to the Counter variable of the Page State.
Inside the Loop, after the Update App State action (not outside the loop, be careful with that), select Update Page State, select the Counter variable, and set Increment/Decrement to 1.
This will add all your query list of string results to the appState list variable.
Let me know if this workaround works for you!
This is the Loop Action completed:
Best regards,
Azanello
After all this explanation i just checked and you can assign the List of Strings variable from the Supabase Query to the List of String of the AppState if the Supabase Query is setted as Single Row (Based on your query with the unique id, this could be your case, so check that your Supabase Query is set as Single Row and not Lists of Rows)
Has your issue been reported?
Current Behavior
Inside an action workflow I have a supabase query which returns a single row of value. Once of the column has a value which is of type List when I try to assign the list to an app state variable which is also of type List it doesnt let me set the whole value as is. When I select update app state variable -->Set value-->> Value to set does not behave the way it should.
Please fix this where users can assign a list to a list variable.
Expected Behavior
assign a list to a list variable in action workflow
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
not a widget
Context
Without this the project workflow is affected since I'm not able to assign a value which is crucial for querying
Visual documentation
Additional Info
Environment
General
Relative to the time the changes were made, data was lost within
When following my steps to reproduce, data loss happens