web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerfx syntax for mul...
Power Apps
Suggested Answer

Powerfx syntax for multiple conditions and multiple actions

(0) ShareShare
ReportReport
Posted on by
What is the correct syntax for the following. I've tried using two semicolons between the actions, I've tried wrapping the actions in curly brackets. Please let me know if you have a working version of something like this. I am in Canada. I understand there are some locale differences in syntax for powerfx. 

 
If(
conditionA ||
conditionB ||
conditionC,

Set(varName,
Patch(
'sitename',
Defaults('ListBName'),
{
Title: "Details",
First_x0020_Name: varItem.First_x0020_Name,
Last_x0020_Name: varItem.Last_x0020_Name,
}
)
);
'PowerAutomateFlowName'.Run(
        'FormName'.LastSubmit.ColumnName & " Some Text",
        varItem.ID,
        varName.ID,
        "Another value"
    )
);

...
 
Categories:
I have the same question (0)
  • Suggested answer
    SebS Profile Picture
    4,826 Super User 2026 Season 1 on at
    it should look like this I added With() So it's more safe to validate the ID exist


    If(
        conditionA || conditionB || conditionC,
        
        With(
            {
                _record:
                    Patch(
                        'sitename',
                        Defaults('ListBName'),
                        {
                            Title: "Details",
                            First_x0020_Name: varItem.First_x0020_Name,
                            Last_x0020_Name: varItem.Last_x0020_Name
                        }
                    )
            },
            Set(varName, _record);
            'PowerAutomateFlowName'.Run(
                'FormName'.LastSubmit.ColumnName & " Some Text",
                varItem.ID,
                _record.ID,
                "Another value"
            )
        )
    )

    Let me know if it works for you hard to check from my end :)
     
     
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Firstly @SebS's structure is more ideal as it eliminates an unnecessary variable (and I have used it below), however I think your issue lies elsewhere. You are patching the site instead of the list
    If(
       conditionA || conditionB || conditionC,
       With(
          {
             _Name,
             Patch(
                'ListBName',
                Defaults('ListBName'),
                {
                   Title: "Details",
                   First_x0020_Name: varItem.First_x0020_Name,
                   Last_x0020_Name: varItem.Last_x0020_Name,
                }
             )
          },
          'PowerAutomateFlowName'.Run(
             'FormName'.LastSubmit.ColumnName & " Some Text",
             varItem.ID,
             _Name.ID,
             "Another value"
          )
       )
    );
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard