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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PowerApp button to run...
Power Automate
Answered

PowerApp button to run get items workflow from Gallery

(0) ShareShare
ReportReport
Posted on by 407

Is it possible to use a button on a gallery to "get items"?  I have a regular workflow that functions when you are creating a new item but I'm hoping to add a button to a gallery so they can run it from there when they are ready to take care of that task.

 

I'd like it to look for 3 values (Dept, Center, Role) from another list that is connected to the powerapp and then send an email to the person working on the checklist the list of security groups they need to enter requests for.

Categories:
I have the same question (0)
  • jnernst Profile Picture
    166 on at

    I think I might be able to help you out. Could you please elaborate more? Is this more of a Power Apps question? If so, connect your data source to the gallery that you desire. You can do this by clicking on the gallery item, it'll be a drop down on the right under properties. That will connect your gallery with your SharePoint list. Make three drop down boxes that target those three values that you want (Dept, Center, Role). You can make a button that utilizes the "Run" command and you can send your email to your coworker via Power Automate.

     

    If you require further instruction, please let me know what I can do to help you out.

    Otherwise, hit the like button so that others with your same issue know what to do.

     

     

  • DCNehs Profile Picture
    407 on at

    I already have a list which is connected to the Powerapp and gallery.  The 3 cascading dropdowns are also connected through the secondary list which this workflow needs to pull from.  Maybe the cascading dropdowns is the problem?  This is my first time attempting trying to run a workflow from a canvas app.

     

    I created the workflow from a video I found, but of course cannot find it again.  And then I'm unsure what to place in the "run" area in the workflow so i've just been taking guesses based on what i saw in the video.

     

    this is the error.  Department seems to be looking at the Title, but even if i change it to title, it comes out the same way.

     

    {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The expression \"Department eq 31and Center eq 10002059 - Engineering Officeand Role eq Director\" is not valid."}}}

     

    Whatever I had next to run in the workflow is now completely erroring and doesn't work at all.

    run.jpg

    getsecurity.jpggetsecurity2.jpg

     

     

  • jnernst Profile Picture
    166 on at

    The Run command is calling to your Power Automate flow. You should put the name of your flow before run.

    I.E. PowerAutomateFlow.Run()

    I recommend you make your flow before you attach it in this way. Using the "ask in powerapps" It makes a call to each value that is required, this should make the syntax easier.

    The action tab has a Power Automate Button that makes linking your Flow much much easier.

     

    *A TIP* hover over the command you are using (In this case "Run") it will preview the syntax required for said command.

  • DCNehs Profile Picture
    407 on at

    I have the name of the flow  Powerappsbuttongetsecuritygroups.Run()

    Created the workflow before attaching but will try it again.  I was following what it was telling me to do when hovering which was asking for those 3 areas but it didn't want to take them.  

    Wish they made this easier to figure out.

     

     

  • jnernst Profile Picture
    166 on at

    I wish they did too. You need to ensure that your values are in the correct format. In some cases it won't accept values at all. Records and tables are very if-y. Try playing with your suffixes...

    Powerappsbuttongetsecuritygroups.Run(ddDepartment.Selected.Text,ddCenter.Selected.Text,ddRole.Selected.Text)

    or

    Powerappsbuttongetsecuritygroups.Run(ddDepartment.Selected.value,ddCenter.Selected.value,

    ddRole.Selected.value)

     

    Try playing around with the suffixes, friend

     

  • v-bofeng-msft Profile Picture
    on at

    Hi @DCNehs :

     

    The point is that the value of 'DropdownName.SelectedText' is an Object but you needs three strings to pass to the flow.

    vbofengmsft_0-1648619505755.png

     

    Please try:

    FlowName.Run(Dorpdown1.SelectedText.Value,Dorpdown2.SelectedText.Value,Dorpdown3.SelectedText.Value)

     

    instead of 

     

    FlowName.Run(Dorpdown1.SelectedText,Dorpdown2.SelectedText,Dorpdown3.SelectedText)

     

    Best Regards,

    Bof

     

  • DCNehs Profile Picture
    407 on at

    ok, so I'm a little further along now.  Made those changes and it's running now.  I also noticed that i didn't have the single quotes in the filter which seemed to make a difference.

     

    So now the workflow is running.  It shows success, but it's not pulling the actual information and just the default entries in Yellow.  I must be filtering incorrectly.  I tried adding a compose after the variables and they are only pulling -.  Any ideas? 

     

    Thanks so much so far for everyone's input here.  This button is going to be super helpful for my folks.

     

    groups.jpg

  • jnernst Profile Picture
    166 on at

    Can I see your whole flow? It seems you are using the Run command... are you submitting your form or updating the entries otherwise in your PowerApps?

     

    If not insert a ";" semi-colon on the end of your Run command.

    Start a new line that says:

    SubmitForm("FormName")

  • DCNehs Profile Picture
    407 on at

    I was not aware there was anything else available than the run command.  First time running a workflow from PowerApps.

     

    They will not be submitting or updating anything.  All of the information is already in the list item that the manager submitted.  The admin later will come back to the list item on the gallery  where I'm hoping they can just click on a button that says "get security groups" and it will look at the fields that the manager originally filled out, compare and look at the separate Security Groups list and send all of the groups associated with the "Department", "Center" and "Role" were chosen.

     

    Get Items is looking at the secondary list with the actual security groups in it.

     

    workflow.jpg

  • jnernst Profile Picture
    166 on at

    Your table won't populate unless you tell it to... I am a bit confused on what you are trying to accomplish.

     

    My apologies,

     

    Josh

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard