Power Automate and AI Prompt how to handle numbers if data is missing

Use Case:

I have a AI Prompt that extracts data from a PDF that is emailed to a specified email account.

The are some number fields and  text fields that may be missing or empty from the PDFs.

The usual answer for a solution is the write into the Prompt:
"If you cannot find the relative data or row write NA."

However, that will not work for a Number column type in sharepoint or dataverse.

So I tried:

"If you cannot find the relative data or row write 0."

That did not work because it was coming into my flow as a Null and erroring out the flow.

So I changed the prompt to:

"If you cannot find the relative data or row write 0.00."

Works perfect for number columns, currency columns and text columns!

Blog Type: