Set coloumn value to reset image picker... doesnt work?

I have an image picker in a single row table custom “builder” form.

User uploads image of an invoice or expense receipt.
AI extracts to JSON, then columns unpack JSON, relates provider names with providers tables, allows for custom inputs or new providers to be added based on data etc etc etc,

It does what i want EXCEPT trying to reset the page.

My reset button is a set coloumn value function that clears all coloumns. When i then try to re-upload an image it doesnt upload. I guess clearing coloumns doesnt clear the file on the backend or something? (even though it shows as cleared in the data editor)

I could make a row in this table for each user, and have the reset button delete that row, re-add a row and write the user email as row ID maybe?

But id like to understand why clear value doesnt clear the image.

Based on your description, it should work.

Can you add some screen shots to provide some more context? Specifically can you show me what the column looks like in the Data Editor?

1 Like

Here is the data editor.

Here is the layout view.

Lastly, here is the workflow.

It does clear the coloumn, and shows empty in the layout view. But if i try to re-upload an image (even the same one) it just… doesn’t. Nothing shows up in layout or data editor.

If i refresh the page, it works (as in, literally refresh the browser). But it is the same in all browsers ive tried.

Thanks! Sorry for the slow reply, just got home from work. (glide is unfortunately not my job!)

That’s weird. Have you had someone on another device try it?

I am currently just working from the editor.

It isnt a published app because i cant get it to work.

Is there functional differences between published and layout editor?

I would try to publish and test it from the live version. Sometimes there’s weird glitches in the editor. Do that, and also clear all the caches for the editor.

ok thanks will do.

I was playing around with the prompts trying to get image to JSON to not put double quotes and “JSON” at the top of it, and ran through 500 updates in one evening.

Apparently it re-runs every time i adjust the text… Guess i am done with this project until next month.

Do you have any tips for getting prompts correct without iterating over and over?

When i put the image into chat GPT it immediately recognizes all the important texts (vendor, client etc) but the glide AI constantly confuses client and vendor (i have english and spanish receipts too). I tried many different prompts that i refined with GPT-5 but it doesnt even return the same data with the same input and prompt each time. Sometimes it will output JSON, then periodically it will output JSON with ““" JSON at the top.

Bit frustrated with myself for not knowing, but also for needing so many iterations to get it to output an actual JSON output consistently.

I would suggest using JSON instructions, not adding too many filler words, and also don’t try it on a table of data. Add a helper table and try with 1 row.

I have been doing it on a single row table.

could you elaborate on what a helper table does in this case?

Thank you so much for the help. Just when i feel like i was getting the hang of basic glide functions and logic, this AI thing has sent me back to square 1.

Edit: I see Robert Pettito was just using generate text and asking it to output JSON instead of text to JSON.

I assume text to JSON and Image to JSON are newer as they dont appear in any guides/videos. Image to JSON is what i want, but it doesnt seem as accurate as Image to text, text to json (or generate text in JSON format)

Any thoughts on this?

I often use JSON for both instructions and output because it keeps things organized and easy to work with later. If possible, I recommend using JSON whenever you can.

To answer your question about the helper table: it’s simply a way to test your prompt without affecting an entire table of data. With a helper table, you only experiment with one row at a time.