List instance Issue

Does anyone know how to solve this issue, I am using list with instance enabled and when I try to get a component data like file button on nth instance my code doesn't properly get the data. For exampe imagesList.instanceValues[0].ImgUploadBtn. I then passed imagesList.instanceValues into a transformer but instead of getting latest uploaded file I am getting previous uploaded file. Transformer is working fine but in Javascript Query I get data for my previous uploaded file.

Hello @Bilal_Asad!

I believe that you can force a refresh of the listview component's instance values to ensure that you get the latest data with yourListView.resetInstanceValues()

The doc for the component (linked below, anchored to the Methods section) shows that you might also need to use the clear method first (to properly ensure old data is not being used in the worst case):

1 Like

Thanks for reaching out, @Bilal_Asad! Did the above recommendation unblock you? If not, you may be able to ensure the variable reference in your JS query is current by toggling on the below option in the query's Advanced settings.

Have you had a chance to revisit this, @Bilal_Asad? Let me know if you have any additional questions!