Data loop when creating new row

Hi. I am trying to reproduce a business card reading system like @grumo but I run into a problem. When I read with AI the data of the card, I check that it recognizes them, and then I take them to another table. The problem is that when I read a new card, although in the table where I have the AI logic it recognizes the new data, when I create the new contact in the contact table, it creates them with the data of the previous one… is as if those data were stuck in a kind of temporary memory, because when the logic is executed to create the new record, those data are no longer in the source table where it takes them…

Good catch @Aldeano_digital - I’ve noticed the same issue.
For some reason, it seems that Glide keeps the data from the last card in some kind of buffer and ignores the data extracted from a new card.

The workaround that works for me is to display the extracted fields right on the Upload Photo screen to verify that they are indeed the contact details from the last photo uploaded.

Then, I add a second visibility conditional to the submit button to only display it when the “Name” field is not empty. The submit button’s last step is to clear the uploaded photo so that field should only be filled in after a new photo has been uploaded.

I tested those changes and now I never get duplicate entries.

Here is a screenshot with the changes:

1 Like

Hello. thanks you for your time. Indeed, as you say, from the time you delete the file from the file picker, until the data is no longer in that kind of temporary buffer, about 10 - 12 seconds pass. If you upload a second contact in less than that time, it picks up the data from the buffer.
So that this space of time is smaller, and in anticipation that some day it can be even greater, what I have done is at the end of the sequence of actions, to add an order to eliminate the row of the input form and one to create it, again, to make sure that those data are eliminated as soon as the contact has been created in the table of contacts and to be able to upload a second contact even if it is 5 seconds later.

La proxima vez que tenga alguna duda acerca de un video tuyo, la hago en castellano, que hay que ir dando un poco de aire latino a la comunidad :wink:
Muchas gracias

1 Like

Very bueno! I like that workaround too. Gracias por compartir!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.