Fill form with AI from uploaded PDF

Hi all, i have form for input invoices where user must upload PDF and fill fields like vendor, description and cost etc. I want to make it easier for operator so she could just upload PDF and all other columns must be filled with AI so user just check text and push submit.

I made column in users table where PDF can be uploaded (“PDF_form”), than i made column AI_text and AI_invoice_description.

So i add button in form screen with custom action :

  1. “Document to text” and fill column AI_text

  2. “Text to texts” with instruction to extract invoice description from AI_text column and put result in AI_invoice_description

it works fine, text recognized and columns filled in Users table… but how to put this text from AI_invoice_description (located in users table) in to form field? Looks like there is no such possibility for form screen… same i want to copy uploaded file link in Users table column “PDF_form” to form field for upload PDF….please advise

1 Like

What you’re probably looking for is using a custom form; search the community for custom form and you can find an explanation on how to apply that. On mobile right now, so couldn’t immediately find the post, but I think it’s from @ThinhDinh. I hope I understood your question correctly, if not, please elaborate.

2 Likes

It’s here from the legend @Darren_Murphy .

I shared it in so many places that people think it’s me :laughing: .

3 Likes

@ThinhDinh haha awesome, well thanks for doing that again. And @Darren_Murphy thanks for making our life easier, answering these questions :sweat_smile:

3 Likes

Gentlemen, looks like there is some bug… so i created form and workflow add row from custom form values

AND

all values filled just fine EXCEPT text column “description” which must be filled from my custom form text field!…. all columns filled fine except this one.

Probably there is some bug based on data stored in column.

BUG:

  • when i see this added invoice there is text description but its not showed in google table.
  • Synchronization of data not solving the issue.
  • If i update app screen with F5 description in App also disappears!

I changed column type to Rich Text - nothing changes.

then I created template column with link to this description column - It shows nothing! (complete mystery)

Please make a screen recording, showing your setup and how you’ve set up the table (data editor) and how you’ve setup your form + submit action.

1 Like

UPD - if i just copy this generated by AI text from column and paste back in same text column IT WORKS.

after PDF uploaded i run this workflow with 2 AI actions

Step1 - PDF to text and store full text in one column

Step 2 - Text to Texts - fill PDF_AI_description column with invoice description

As you can see column PDF_AI_description filled but look at template column PDF_AI_description TEST

It must take this text from PDF_AI_description but its nothing

If i fill column PDF_AI_description manually Template also filled just as it should be

Wait i found it.

i used “Text to Texts”… it gives this mystery result

i changed to “Generate Text” and it works. :grinning_face:

1 Like

@Alexey_Khrolovich

This method by @Robert_Petitto will be very helpful for your use case.

This generates an “array” of text. Whilst it doesn’t look like that on the frontend, Glide considers it an array, hence why a template column fails to “stringify” it.

Also, is it intended that your actions seem to always read and write to user profile columns?

Nice, happy you found it! Also, same question as ThinhDinh: what’s the reason you’re using the user profile columns for this? In case you’re using that as a Custom Form, I would recommend using a helper table, to keep things organized.