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 / I have a gallery and w...
Power Apps
Answered

I have a gallery and want to combine two functions.

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • Verified answer
    JohnM86 Profile Picture
    590 on at

     

    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

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 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard