Canvas Apps Power Automate

J – JSON – How to call a flow from Power Apps?

An antique phone
An antique phone

Introduction

JSON is one Power Apps function that a lot of makers don't use or know about. Especially the ones, like me, who don't use Power Automate flows that much. But if you do, then you might have faced a situation in which you had to change the parameters to your flow. For the complete list of Power App functions, click here.

Here is an example:

Set(
    myUser,
    {
    FirstName: ""John"",
    LastName: ""Doe"",
    Email: ""jdoe@contoso.com""
    }
);

MyFlow.Run(
    myUser.FirstName,
    myUser.LastName,
    myUser.Email
)

Now, let's say, you delete the last name parameter but then add it back. This changes the sequence of parameters which will need a change in your code to make sure the values get passed correctly.

The tip - JSON

Instead, just use the JSON function in the following manner to save the need for changing your code:

With(
    {
        myUserJSON: JSON(myUser)
    },
    MyFlow.Run(myUserJSON)
)

Stay tuned for the remaining 16 tips!

Recent articles

Leave a Reply