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
Solved! Go to Solution.
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."
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"
)
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?
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."
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.
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.
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.
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
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"
)
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?
User | Count |
---|---|
228 | |
103 | |
96 | |
57 | |
31 |
User | Count |
---|---|
283 | |
113 | |
107 | |
63 | |
62 |