cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wildchang
Frequent Visitor

Run function in power apps

Hey, will a run function work if I place a lookup expression into its parameters.  It would look something like this.  

 

PowerAutomateFlow1.Run(Lookup()).

 

I am trying to bring forth a specific record from a table by using this specific function.  This function will make a button active.  

2 REPLIES 2
TheRobRush
Super User
Super User

SubmitShuttleChecklistAddendum.Run(

    JSON(
               {
                   ID1:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID2:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID3:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID4:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID5:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID6:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID7:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID8:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID9:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID10:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID11:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID12:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID13:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID14:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID15:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID16:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID17:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID18:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID19:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID20:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID21:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID22:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID23:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID24:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID25:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail"),
                   ID26:If(LookUp(AddendumChoice,FalseID=1,PassFail)=true,"Pass","Fail")
                }
            ),
    NotesVar,
    Text(Now(),DateTimeFormat.ShortDate),
    Switch(
       loggedinVar.DISPLAYNAME,
        Blank(),
        First(LastN(Split(loggedinVar.Title,","),1)).Result&" "&Last(FirstN(Split(loggedinVar.Title,","),1)).Result,
        First(LastN(Split(loggedinVar.DISPLAYNAME,","),1)).Result&" "&Last(FirstN(Split(loggedinVar.DISPLAYNAME,","),1)).Result
        ),
    loggedinVar.EmployeeSSO,
    Text(Now(),"yyyy/mmmm/dd"),
    Concatenate(Upper(Text(Now(),"ddmmmyyyy"))," - ",First(AddendumChoice).Venue),
    venueType,
    First(AddendumChoice).Venue,
    {file:First(SignatureCapture)})

Above is an example of a PA Run I launch form within my own powerapps, it has several lookups

 

-See Randy's answer below, misread

 

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
RandyHayes
Super User
Super User

@wildchang 

Yes, the LookUp works fine as a parameter for the Run action.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,637)