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 Automate / .Run function Optional...
Power Automate
Suggested Answer

.Run function Optional fields

(0) ShareShare
ReportReport
Posted on by 14
I have a PowerApps app to create new document sets, and I've set up a flow to create new document sets using a PowerApps trigger. The manual trigger in the flow works as expected. I've configured optional fields that can be left blank. However, in the run function within my PowerApps app, it only requests 8 out of the 12 fields. I have 4 optional fields, but I am receiving an error stating there are too many arguments. Even though these fields are optional in my flow, they are still part of the PowerApps V2 trigger. Why is this causing an error when I enter all 12?
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    69,427 Most Valuable Professional on at
    Optional fields used as parameters in a flow still need to be supplied in the run(). For optional fields you can supply a null value using a record format, but they still need to be there. For required fields a null value will throw an error.  Here's an example of a run() that sends one required and one optional value.
     
    flowname.run("text value to pass", {optionalfieldname: null})

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • DS-14111351-0 Profile Picture
    14 on at
    If I leave my optional blank it gives me an error

    {
    date_2: Text(
    DataCardValue64.SelectedDate;
    "yyyy-mm-dd"
    );
    text_3: Text(DataCardValue60.Value);
    text_4: Text(DataCardValue61.Value);
    number_1: DataCardValue65.Value
    }
     
    Full function : 

    NewDocSetManifest.Run(
    DataCardValue51.Value;
    DataCardValue188.Selected.Value;
    Text(
    DataCardValue59.SelectedDate;
    "yyyy-mm-dd"
    );
    Text(
    DataCardValue58.SelectedDate;
    "yyyy-mm-dd"
    );
    Text(
    DataCardValue63.SelectedDate;
    "yyyy-mm-dd"
    );
    Concat(
    Filter(
    DataCardValue57.SelectedItems;
    !IsBlank(Value)
    );
    Value;
    ","
    );
    DataCardValue62.Value;
    DataCardValue66.Selected.Value;
    {
    date_2: Text(
    DataCardValue64.SelectedDate;
    "yyyy-mm-dd"
    );
    text_3: Text(DataCardValue60.Value);
    text_4: Text(DataCardValue61.Value);
    number_1: DataCardValue65.Value
    }
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard