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:
  • Suggested answer
    Pstork1 Profile Picture
    69,665 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard