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 : fpU4oMy4MLEElUnKM0Vzeo
Power Apps - Building Power Apps
Answered

I have a gallery and want to combine two functions.

Like (0) ShareShare
ReportReport
Posted on 18 Apr 2023 19:18:20 by 171

I have a gallery and want to combine two functions.  The first function will make alternate rows in the gallery different colors.  The second function is for my search criteria.  I put both functions in the Items function and I get errors.  What am I doing wrong. 

 

With ({records: Job0013_Holiday_Gift_List},

                ForAll (Sequence(CountRows(records)), Patch(Last(FirstN(records, Value)), {rowNumber:Value}))

);

Search(Job0013_Holiday_Gift_List, TextInput_Search.Text,"EMail","Company","First_Name","Last_Name")

Categories:
  • Verified answer
    JohnM86 Profile Picture
    590 on 18 Apr 2023 at 19:22:16
    Re: I have a gallery and want to combine two functions.

     

    To combine the two functions, you need to use the output of one function as input to the other function.

    In your case, you can apply the Search() function to the output of the ForAll() function like this:

     

     
    Search( ForAll( Sequence( CountRows(Job0013_Holiday_Gift_List) ), Patch( Last(FirstN(Job0013_Holiday_Gift_List, Value)), {rowNumber: Value} ) ), TextInput_Search.Text, "EMail", "Company", "First_Name", "Last_Name" )
     

    Note that I have replaced your reference to {records: Job0013_Holiday_Gift_List} with

    Job0013_Holiday_Gift_List directly in the expression, as it is unnecessary to define a new variable just to reference the gallery data source.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete