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 / Issues with .Run( ) in...
Power Apps
Answered

Issues with .Run( ) in Power Apps

(0) ShareShare
ReportReport
Posted on by 50

Hello,

 

POST UPDATED

 

I have managed to sort out the issue below. I deleted the flow from power automate and the power apps and reinstated them. The number of arguments are now correct (41). The issue that I am now having is that there are "invalid arguments". The purple elements work wonderfully, the other... not so much lol.

 

SubmitForm(Form1);If(IsEmpty(Errors('MySuccess@Work')),Notify("Success",NotificationType.Success);Navigate(MainAppScreen),Notify(First(Errors('MySuccess@Work')).Message,NotificationType.Error)); 'PowerApp->PopulateaMicrosoftWordtemplate'.Run(DataCardValue23.Text,DataCardValue18.Text,DataCardValue3.SelectedItems,DataCardValue4.SelectedItems,DataCardValue6.SelectedDate,DataCardValue14.Text,DataCardValue36.Text,DataCardValue26.Text,DataCardValue33.Text,DataCardValue41.SelectedDate,DataCardValue22.SelectedDate,DataCardValue35.Text,DataCardValue19.Text,DataCardValue4.SelectedItems,DataCardValue8.Text,Radio1.Selected,DataCardValue16.Text,DataCardValue36.Text,DataCardValue13.SelectedItems,DataCardValue4.SelectedItems,DataCardValue37.Text,DataCardValue28.SelectedDate,DataCardValue5.Text,DataCardValue2.Text,DataCardValue7.Text,DataCardValue27.Text,DataCardValue1.SelectedItems,DataCardValue11.Text,DataCardValue12.Text,DataCardValue38.Text,DataCardValue9.SelectedItems,DataCardValue32.Text,DataCardValue34.Text,DataCardValue15.Text,DataCardValue39.Text,DataCardValue6.SelectedDate,DataCardValue41.SelectedDate,DataCardValue36.Text,DataCardValue21.SelectedDate,DataCardValue17.Text,DataCardValue20.Text)

 

Can anyone tell me what I am doing wrong? Is there anything special I need to do for DataCardValue?

 

TIA 🙂 

 

BEFORE FIXED

Have the data auto populate a Microsoft Word Template through ".Run( )". My issue is, is that I am missing an argument in power apps (stating there is only 41 and I need 42).  I have had the screens next to each other and copied verbatim. The anomaly I can see in the 'PowerApps Code View', is the following highlighted:

 

Amanda4_1-1677464528954.png

Flow below

Amanda4_2-1677464633924.png

 

Having a look at the Ask Power Apps there is one that is _File but I have no idea what I am meant to input into my Power Apps. Is it referring to the actual file name? If so, what do I input into my Power apps? Do I need to put "PopulateMicrosoftWorkTemplate_File" in the File component of the flow? I even tested the flow manually and it doesn't come up anywhere in the MS docx.

 

Any help would be greatly appreciated!

 

TIA 🙂

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Amanda4 ,

     

    I can see several .SelectedItems, which are absolutely of type table and cannot be populated into Word template. Could you please share a screenshot of the fields in the template and corresponding Controls in PowerApps?

     

    Best regards,

  • Amanda4 Profile Picture
    50 on at

    Hi @v-jefferni,

     

    Thanks for your reply.

     

    I figured as much. My alternative is to set the power automate to occur from the SharePoint list rather than the Power Apps. With the .SelectedItems fields needed, would you recommend this? There are choice columns within my SP list. Would this be an issue when setting up a flow from my list to the doc?

     

    Please see the snips below as best I can. There are a lot of elements to the app. The first snips are of the template that I am using. I set the properties to the power app values so that I could better match them when it came to creating the flow. Following this is a table of the controls (I believe and correct me if I am wrong). 

     

    Amanda4_0-1677490451416.pngAmanda4_1-1677490473835.pngAmanda4_2-1677490494756.pngAmanda4_3-1677491513999.png

    Thanks again,

    Amanda

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Amanda4 ,

     

    If these Choices columns allow single selection, you need Combobox.Selected.Value as the values to populate into Word template.

     

    Best regards,

  • Amanda4 Profile Picture
    50 on at

    Hi @v-jefferni ,

     

    I have already tried this as another option yesterday but still didn't work.

     

    All good, I have changed tack and created the power automate based on the SP list. I just need to have a play for it to incorporate the choice columns but other than that it seems to working 🙂

     

    Thanks for your help. 

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Amanda4 ,

     

    If those are Choices columns that allow multiple selections, you will need a Concat function for them:

    Concat(DataCardValue9.SlectedItems, Value, ",")

    This function will concatenate all selected values together with a coma.

     

    Best regards,

  • Amanda4 Profile Picture
    50 on at

    Hi @v-jefferni,

    This is what I ended up doing in power apps. I also then made a corresponding column in my SP list that is populated with the concat from my multi choice column. I am running my power automate flow based off of this column to populate my word doc. All works and I am one happy lady. 

     

    Thanks for your guidance 😊

     

    Cheers, 

    Amanda

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard