cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TML
Advocate II
Advocate II

Button runs a flow; then execute a command. Doesn't work

Hi all,

I've seen several posts about not being able to chain commands together.  Most seem to be related to using a single ; to seperate commands or having to use two ;;.

I am in the US, so I just need the single ;  However, the Flow will run and create a record (it executes a SQL Stored Procedure), but the second command never executes.

 

Here is the code:

 

CreateRec.Run(txtCode.Text, txtHighTemp.Text); UpdateContext({vHTemp:""})

 

If I try using two semicolons, it tells me "Expected an Operator"

1 ACCEPTED SOLUTION

Accepted Solutions

I need UpdateContext to run afterwards so, Concurrent won't work in this instance.  Running a flow and then subsequent commands still doesn't work for me. I had to create a workaround by having 3 buttons.  Button1 is the main button that the user clicks.  Button1 uses Select() to call hidden buttons Button2 and Button3.  Button2 runs the flow. Button3 does the UpdateContext.  Kludgy, but it's the only thing I could find that works.

View solution in original post

6 REPLIES 6
TML
Advocate II
Advocate II

Weird, but if I put the UpdateContext command first, it runs both commands.  Of course I don't want to execute UpdateContext until AFTER I run the Flow.  Is there something weird about running a Flow that no other commands can be chained aftwerwards?

TML
Advocate II
Advocate II

Anyone have any ideas?  Anyone NOT having this problem?

v-micsh-msft
Community Support
Community Support

Hi TML,

 

 

My testing works.

And I don't think the sequence would have influence of the UpdateContext().

In addtion, please take a try with the Concurrent () function:

ConcurrentFormula1Formula2 [, ...] )

 

For your scenario, switch the whole formula as below:

Concurrent(
CreateRec.Run(txtCode.Text, txtHighTemp.Text),
UpdateContext({vHTemp:""})
)

See if that would make any difference.

If you would like the UpdateContext to run after the Flow, then you should keep with the " ;  " operator.

More information, see:

Concurrent function in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-micsh-msft,

I think Concurrent is a new function.
I often check here:


https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/release-notes

and although there are new functions, there are not any release notes, since May 30th. 
Should I check somewhere else to get updated?

Thank you


I need UpdateContext to run afterwards so, Concurrent won't work in this instance.  Running a flow and then subsequent commands still doesn't work for me. I had to create a workaround by having 3 buttons.  Button1 is the main button that the user clicks.  Button1 uses Select() to call hidden buttons Button2 and Button3.  Button2 runs the flow. Button3 does the UpdateContext.  Kludgy, but it's the only thing I could find that works.

View solution in original post

martinav
Resident Rockstar
Resident Rockstar

@TML,

 

I'm trying to execute commands upon a "Respond to PowerApps" returning a value.  However, I cannot find a way to have powerpps execute functions based on a value changing.  "OnChange" inside of a Text Input object does not work.  That would work in your case too, if there is a way to execute commands based on changes from the external source.

Helpful resources

Announcements
PA 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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (85,053)