cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ALFRED05
Helper III
Helper III

FORM PROCESSOR-NUMBERS FETCH AS TEXT

Hi all,

 

Right now, every field the form processor fetchs is TEXT type..how this can be changed? since there are numbers there.

 

thanks

Alfredo 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ALFRED05,

 

Can you share how you have written the float function?

 

Here's an example of how it could look like: float(outputs('Process_and_save_information_from_forms')?['body/responsev2/predictionOutput/labels/Invoice_c07c9cb94c35e3b7ad2a2db05978cfea/value'])

2020-06-06_23-13-21.png

View solution in original post

6 REPLIES 6
JoeF-MSFT
Power Apps
Power Apps

Hi @ALFRED05,

 

Thanks for the question. Indeed today your Form processing model will return the extracted values as text. You can then use the built in function in both Power Automate and Power Apps to convert the desired outputs to number.

In a flow you can use both the int() function (or the float() function if your number has decimals) as shown here:

Untitled Project.gif

In an app in Power Apps, you can use the Value() function like this:


2020-06-06_17-17-57.png

I hope this helps! Lets us know if you have more questions. 

ALFRED05
Helper III
Helper III

Thanks Joe! but it didnt work :(, I got this error. maybe worth mention I am using a sharepoint file to record the outcomes, I have tried changing the column type to NUMBER but still the same error.

Captura4.PNG

 I tried without the float function and it worked.

the problem is that is as TEXT in sharepoint.

 

Hi @ALFRED05,

 

Can you share how you have written the float function?

 

Here's an example of how it could look like: float(outputs('Process_and_save_information_from_forms')?['body/responsev2/predictionOutput/labels/Invoice_c07c9cb94c35e3b7ad2a2db05978cfea/value'])

2020-06-06_23-13-21.png

View solution in original post

I did it exactly like in the video, picking up the parameter from the dynamic content

 

float(outputs('Predict')?['body/responsev2/predictionOutput/labels/Total/value'])
ALFRED05
Helper III
Helper III

I JUST REALIZED WHY IT GIVES THE ERROR!...the number has a $, that must be the issue. Sorry to bother you!!

 

 

Great to hear you found the issue @ALFRED05. Not bothering at all. 🙂

 

You could leverage the replace function to get rid of the $ sign and then convert to number like this: 

float(replace(outputs('Predict')?['body/responsev2/predictionOutput/labels/Total/value'],'$',''))

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Kudoed Authors
Users online (46,409)