cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted
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?

Highlighted

Anyone have any ideas?  Anyone NOT having this problem?

Highlighted

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.
Highlighted

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


Highlighted

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

Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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