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 / Multi formula in item ...
Power Apps
Answered

Multi formula in item gallery

(0) ShareShare
ReportReport
Posted on by 163

Hi, 

 

I take the liberty of opening a new topic.

 

lately @timl and @WarrenBelz

 

my a lot of help in solving a problem.

 

But now a new question arises.How can I cumulate several formulas in a gallery item

 

for example, i have in my item this formula

 

 

AddColumns(PRODUCT; 
 "Tag_Name"; 
 LookUp(TAG;ID_TAG=PRODUCT[@ID_TAG]).TAG_NAME;
 "PROVIDER_NAME"; 
 LookUp(PROVIDER;ID_PROVIDER=PRODUCT[@ID_PROVIDER1]).PROVIDER_NAME
)

 

 

 I need to add this instruction

 

Search(PRODUCT;tdSearchinput.Text;"PRODUCT_NAME";"TAG_NAME";"PROVIDER_NAME")

 

thank you for your explanations

 

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @tuonoman 

    You may combine those two sections of code like this.

     

     

    Search(
     AddColumns(PRODUCT; 
     "Tag_Name"; 
     LookUp(TAG;ID_TAG=PRODUCT[@ID_TAG]).TAG_NAME;
     "PROVIDER_NAME"; 
     LookUp(PROVIDER;ID_PROVIDER=PRODUCT[@ID_PROVIDER1]).PROVIDER_NAME
     );
     tdSearchinput.Text;"PRODUCT_NAME";"TAG_NAME";"PROVIDER_NAME"
    )
    

     

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • tuonoman Profile Picture
    163 on at

    Hi @mdevaney 

     

    I tested your proposal, unfortunately it doesn't work.

     

    Any idea why?

     

    thanks

  • PaulD1 Profile Picture
    2,914 on at

    How many rows of data are in your data sources and what is your data source (SharePoint, CDS, SQL)? You may be hitting a delegation issue (e.g. your Search cannot be processed on the server so PowerApps is pulling down the first X rows and searching them itself - X is the delegation limit which is normally set at 500 but can be increased to 2000 in the Advanced Settings - if the data you are searching for is outside the first X rows it won't be found).

    Just a note that doing the LookUps inside the AddColumns is going to fire a separate network call for each LookUp for each row of your data which could be pretty horrible for performance if you have many rows.

  • tuonoman Profile Picture
    163 on at

    @PaulD1 

     

    At the moment I am in a learning phase.
    I'm testing, learning, trying to get an opinion on PowerApps.

    I am carrying out these tests on the basis of an Excel table stored on onedrive.
    This table only contains a few lines.

    I take note of your comments concerning the "lookups" function, do you have another proposal.

    Maybe it would be smarter to make a table via Power Query and call this table in Powerapps.

    The next step of my self-training would be to solve this problem. Table edition and the feedback of the information in my Excel tables. But that will be another Topic.

     

    Thank you for your help.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @tuonoman 

    No I don't know why unless you give me feedback about my solution. What do you mean by 'it doesn't work'? 

    What about the code didn't work?  Errors?  No data?  Not the correct rows returned?  Please give details.

  • tuonoman Profile Picture
    163 on at

    Hi @mdevaney 

     

    Indeed if I don't give you more details it's not very cool of me.

     

    the errors message are:

     

    - The name is not valid. This indicator is not recognized.

     

    - An operator was expected. We are expecting an operator such as +,*or & at this stage of the formula"

     

    Independently, both functions work, but together they pose a problem.

     

    Strange

     

    Capture.PNG

  • Verified answer
    timl Profile Picture
    37,422 Super User 2026 Season 2 on at

    Hi @tuonoman 

    I think you just have an extra semi-colon in your formula. If you try the following, that should hopefully remove your error.

    Search(
     AddColumns(PRODUCT; 
     "Tag_Name"; 
     LookUp(TAG;ID_TAG=PRODUCT[@ID_TAG]).TAG_NAME;
     "PROVIDER_NAME"; 
     LookUp(PROVIDER;ID_PROVIDER=PRODUCT[@ID_PROVIDER1]).PROVIDER_NAME
     );
     tdSearchinput.Text;"PRODUCT_NAME";"TAG_NAME";"PROVIDER_NAME"
    )

     

     

  • tuonoman Profile Picture
    163 on at

    @timl , @mdevaney 

     

    With the lynx's eye, it works!

    That I understand. Why is it necessary to position the function add column in the search function?

     

    Many thanks

  • Verified answer
    timl Profile Picture
    37,422 Super User 2026 Season 2 on at

    Hi @tuonoman 

    The search function takes three arguments - a source table (or data source), the search criteria, and the columns that you want to search.

    In this example, the AddColumns function joins your 3 tables. The important thing here is that the return value from AddColumns is a data table with those three tables joined. You can then pass this return value as an input to the Search function.

    This is the reason why AddColumns is nested inside Search. Does that make sense?

  • mdevaney Profile Picture
    29,993 Moderator on at

    @tuonoman 

    I have corrected the small syntax error in my post above.  Can you please Accept it as the Solution?  I believe it was what you used to solve the problem.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard