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

Community site session details

Session Id :
Power Automate - Using Flows
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?
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,324 Most Valuable Professional on at
    .Run function Optional fields
    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
    .Run function Optional fields
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 560 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 347 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 262 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow