cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Receiving wrong datatype from Flow

Hello,

I have a Flow that retrieves the max ID of a SharePoint column. When I test it, the return value is OK, but When I call it from PowerApps it won't work.
I want to receive an integer.
If I put a Respond To PowerApps, I get a Record that contains an ID, but thats not and int :

My flow with a respond to PowerappsMy flow with a respond to Powerapps

Here is the outputHere is the output
If I put a Compose, even though Flow is said to sent an int, PowerApps receives it as a boolean :

My flow with a ComposeMy flow with a Compose

Here is the output with a ComposeHere is the output with a Compose

Here is my function :

add(outputs('Obtenir_les_éléments').body?.value[0].ID,1)

Here is how I call my Flow, on a basic button

Set(selectedId;GetMaxElementFromColumn("ID"))

I hope you can help me,
Adrien

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Receiving wrong datatype from Flow

Hi @AdrienBeaussier 

 

Typecast your add expression with an int

 

example: int(add(1,1))

 

Flow responding to PowerApps creates issues with Number type for some reason

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

View solution in original post

Highlighted
Dual Super User
Dual Super User

Re: Receiving wrong datatype from Flow

@AdrienBeaussier 

 

Return type schema is always of "type": "object" which would be a record

 

Just parse through the record in PowerApps and get your data

 

example - testflow.Run().numberval

 

tesflow - name of flow

 

numberval - name of output being returned from PowerApps to Flow

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User
Dual Super User

Re: Receiving wrong datatype from Flow

Hi @AdrienBeaussier 

 

Typecast your add expression with an int

 

example: int(add(1,1))

 

Flow responding to PowerApps creates issues with Number type for some reason

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

View solution in original post

Highlighted
Frequent Visitor

Re: Receiving wrong datatype from Flow

Hello @RezaDorrani and thanks for your quick answer

 

I modified my expression to

int(add(outputs('Obtenir_les_éléments').body?.value[0].ID,1))

but it still won't work, I receive a Record.

I've refreshed my flows, tabs and app.
What did I do wrong ?

Highlighted
Dual Super User
Dual Super User

Re: Receiving wrong datatype from Flow

@AdrienBeaussier 

 

Return type schema is always of "type": "object" which would be a record

 

Just parse through the record in PowerApps and get your data

 

example - testflow.Run().numberval

 

tesflow - name of flow

 

numberval - name of output being returned from PowerApps to Flow

View solution in original post

Highlighted
Frequent Visitor

Re: Receiving wrong datatype from Flow

That's so smart, why didn't I think about that... Thanks a lot !

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,021)