Hi everyone,
I have 2 Sharepoint lists, let's say ListA and ListB and they are both connected to my PowerApps canvas app
ListA has fields
ID Currency
1 EUR
2 USD
3 JPY
4 CNY
ListB has fields
ID
1
1
1
3
4
I made a gallery consists of ListB items and now I would like ListB to show the Currency matching the IDs in ListA instead of showing the numbers so ideally the gallery will show
EUR
EUR
EUR
JPY
CNY
is this achievable? If not, what are the alternatives? Thank you all in advance 🙂
Solved! Go to Solution.
This should be achieveable with the Lookup function, something like this:
LookUp( ListA, ID = ThisItem.ID, Currency), put this code in the Text property of the gallery label.
However, because both columns are called 'ID' PowerApps may throw a tantrum which means you'll have to use disambiguation or RenameColumns() to fix it. RenameColumns would look like:
LookUp ( RenameColumns(ListA, "ID", "ID1"), ID1= ThisItem.ID, Currency)
@Anonymous
This is definitely achievable. My assumption is ID is a number type column and currency is a text type column. No lookup type columns are being used in either collection.
The simplest way is to put a label in your gallery with the following code in the Text property.
LookUp(ListA,ThisItem.ID,Currency)
Another way is to put this code in the Items property of your gallery...
DropColumns(
AddColumns(ListB,"Currency",LookUp(ListA,ThisItem.ID,Currency)),
"ID"
)
...and then put a label with the following Text property in the gallery
ThisItem.Currency
My preference would be the 1st option.
---
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."
Thank you guys so much! @mdevaney @Anonymous
I made it work by combining both of your answers.
I changed the text field of the label as LookUp(ListA, ID = ThisItem.ID, Currency) and it worked perfectly without name ambiguity problems 🙂
I appreciate your help and have a nice day where ever you are!
This should be achieveable with the Lookup function, something like this:
LookUp( ListA, ID = ThisItem.ID, Currency), put this code in the Text property of the gallery label.
However, because both columns are called 'ID' PowerApps may throw a tantrum which means you'll have to use disambiguation or RenameColumns() to fix it. RenameColumns would look like:
LookUp ( RenameColumns(ListA, "ID", "ID1"), ID1= ThisItem.ID, Currency)
@Anonymous
This is definitely achievable. My assumption is ID is a number type column and currency is a text type column. No lookup type columns are being used in either collection.
The simplest way is to put a label in your gallery with the following code in the Text property.
LookUp(ListA,ThisItem.ID,Currency)
Another way is to put this code in the Items property of your gallery...
DropColumns(
AddColumns(ListB,"Currency",LookUp(ListA,ThisItem.ID,Currency)),
"ID"
)
...and then put a label with the following Text property in the gallery
ThisItem.Currency
My preference would be the 1st option.
---
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."
Thank you guys so much! @mdevaney @Anonymous
I made it work by combining both of your answers.
I changed the text field of the label as LookUp(ListA, ID = ThisItem.ID, Currency) and it worked perfectly without name ambiguity problems 🙂
I appreciate your help and have a nice day where ever you are!
@Anonymous
No problem at all.
If we both helped you can Accept both of our answers as the solution. ♥️ Share the love ❤️
User | Count |
---|---|
126 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
214 | |
179 | |
139 | |
105 | |
83 |