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 / The Method Run has and...
Power Apps
Answered

The Method Run has and invalid parameter - from drop down

(0) ShareShare
ReportReport
Posted on by 214

I'm working on sending several parameters to a PowerAutomate flow. 

 

The variables for the Power Automate Flow is set to capture a String

LyonsBI_BRL_0-1646912875339.png

In my items for the Pistol / Select (this is for an ATF form) I'm running the following below from my drop down menu to select either two types of categories.

If(IsBlank(Manufacture3.Text),Blank(),Distinct(PistolType.PistolType,PistolType))

When I go to submit the information, it keeps erroring out saying the following below

LyonsBI_BRL_2-1646913062026.png

This message keeps popping up when ever I attempt to run my Power Automate flow, with the OnSelect statement shown below.

Set(varShowSpinner, true);
MultiplePistolTransferPDFGenerator.Run(
 DateForm.SelectedDate,
 DateForm_7.SelectedDate,
 Last_First_MiddleMPFT.Text,
 FirstNameMPT.Text,
 LastNameMPT.Text,
 MiddleMPT.Text,
 DriversLicenseNumber.Text,
 DriversLicense.Text,
 DateofBirth.SelectedDate,
 SexSelect.SelectedText.Result,
 Hispanic.Value,
 NonHispanic.Value,
 AmericanIndian.Value,
 Asian.Value,
 Native.Value,
 Black.Value,
 White.Value,
 SexSelect.SelectedText.Result,
 Name_of_Agency.Text,
 Agency_Address_City_State.Text,
 EmployeeFillingoutForm.Text,
 FormWasCompleted.SelectedDate,
 Manufacture1.Text,
 Model1.Text,
 SerialNumber1.Text,
 PistolSelect1.SelectedText.Result,
 CaliberSelect1.SelectedText.Result,
 Dateform_1.Text,
 Manufacture2.Text,
 Model2.Text,
 SerialNumber2.Text,
 PistolSelect2.SelectedText.Result,
 CaliberSelect2.SelectedText.Result,
 Dateform_2.Text,
 PlaceofBirthCityStateCountry.Text,
 WA_State.Text,
 TransfereeAddress.Text,
 Manufacture3.Text,
 Model3.Text,
 SerialNumber3.Text,
 PistolSelect3.SelectedText.Value,
 CaliberSelect3.SelectedText.Result,
 Dateform_3.Text,
 Manufacture4.Text,
 Model4.Text,
 PistolSelect4.SelectedText.Result,
 SerialNumber4.Text,
 CaliberSelect4.SelectedText.Result,
 Dateform_4.Text,
 Manufacture5.Text,
 Model5.Text,
 SerialNumber5.Text,
 PistolSelect5.SelectedText.Result,
 CaliberSelect5.SelectedText.Result,
 Dateform_5.Text,
 Manufacture6.Text,
 Model6.Text,
 SerialNumber6.Text,
 PistolSelect6.SelectedText.Result,
 CaliberSelect6.SelectedText.Result,
 Dateform_6.Text,
 ConnectedYES.Value,
 ConnectedNO.Value 
);
Set(varShowSpinner, false);

  

Basically I want to be able to pass in a NULL value here if nothing is selected, though it keeps giving me that error. Any suggestion would be greatly appreciated. 

 

Thanks!

Categories:
I have the same question (0)
  • larschrjensen Profile Picture
    72 on at

    If I have to guess I'd say you'd want this:

     PistolSelect3.SelectedText.Value,

    to instead be:

     PistolSelect3.SelectedText.Result,

     

  • LyonsBI_BRL Profile Picture
    214 on at

    Just tried that, same error if I set it to .Value instead of .Result

  • ansrikanth Profile Picture
    329 on at

    Sorry, a bit confused here.. what is the Type3 you are setting ? 

     

    If this is what you used to set the Type3 value 

    If(IsBlank(Manufacture3.Text),Blank(),Distinct(PistolType.PistolType,PistolType))

    then why can't you simply change this to 

    If(IsBlank(Manufacture3.Text),"",Distinct(PistolType.PistolType,PistolType))

     

    Orelse, you have an option to check the value in the powerautomate it self and set it to empty instead of null.

     

    Thank you

    -Srikanth

  • ansrikanth Profile Picture
    329 on at

    And also, If I were to design this - I would not set these many params to PowerAutomate, which is not only confusing & un readable but also difficult to extend. I would rather use a JSON formatted text and send it as a record to the Powerautomate.

     

    Thank you

    -Srikanth

  • LyonsBI_BRL Profile Picture
    214 on at

    Yeah just tried that as well, still no go - 

    LyonsBI_BRL_0-1646918943022.png

     

  • ansrikanth Profile Picture
    329 on at

    Could you please expand where you are using this formula (on what event) and what is the error and how its been used to send to Power Automate?

     

    Thank you

    -Srikanth

  • LyonsBI_BRL Profile Picture
    214 on at

    @ansrikanth can you elaborate a bit regarding what you are looking for here? Just so I know what I need to send back here to make a bit more sense as to what I'm trying to do.

     

    Thanks!

  • ansrikanth Profile Picture
    329 on at

    I Understand you are sending some parameters to a Power automate flow, one of the parameter is sending a Null value which is causing problem in the power automate to set a string variable.

    What I didn't understand is where you are using the formula 

    If(IsBlank(Manufacture3.Text),Blank(),Distinct(PistolType.PistolType,PistolType))

    and how it is related to your power automate flow.

     

    Thank you

    -Srikanth

  • LyonsBI_BRL Profile Picture
    214 on at

    Not really related, the reason I was doing it that was way was to force the NULL value, from the error I was getting. For getting the items for that dropdown list, usually I'll use

    Distinct(PistolType.PistolType,PistolType)

     

  • ansrikanth Profile Picture
    329 on at

    Are you talking about 2 different issues here? I'm a bit confused, Sorry - unless you give me more detailed information, I can't help you much here.. good luck.. !!

     

    Thank you

    -Srikanth

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard