cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
arichards
Level: Powered On

powerapps look at local table and show another column of matching row

OnStart of my App I have set: 

ClearCollect(CurrencySym,{Currency: "Australian Dollar", Symbol: "A$"},{Currency: "United States Dollar", Symbol: "$"},{Currency: "Canadian Dollar", Symbol: "C$"},{Currency: "Great Britian Pound", Symbol: "£"},{Currency: "Euro", Symbol: "€"},{Currency: "Chinese Yuan", Symbol: "¥"},{Currency: "Zambian kwacha", Symbol: "ZK"},{Currency: "Singapore Dollar", Symbol: "S$"},{Currency: "Japanese Yen", Symbol: "¥"},{Currency: "chilean Peso", Symbol: "$"})

 

I have data card called currency type linked to my sharepoint list where user would select currency type. Datafield: Currency_x0020_TypeNew

 

Then there are number boxes on the form for the user to input their cost number only.

 

I am trying to create a text field infront of number boxes to show the symbol of selected currency type = to currency in CurrencySym table and show just the matching symbol.

 

I have tried lookup in a text and label box: LookUp(CurrencySym,Currency_x0020_TypeNew.Value=CurrencySym.Currency,Symbol) -error "Invalid argument type"

 

I have also tryed filtering and that failed too. Any ideas on how to accomplish this?

1 ACCEPTED SOLUTION

Accepted Solutions
KroonOfficeSol
Level 10

Re: powerapps look at local table and show another column of matching row

@arichards

 

First: next time format your formula (in this case this wasn't needed, but with other formula's this wil help) and place them in a code box. See in the menu the </> sign.

 

Oke on your question:

You have a combobox or dropdown in the datacard where he people select the currency, is this correct?

 

Then you can just reference this control selected value like

YourComboBox.Selected.CurrencySymbolField

Or on change off this combobox put it in a variable and use this on the labels. Like

UpdateContext({YourCurrencyVariable: YourComboBox.Selected.CurrencySymbolField})

 

So basically the CurrencySym collection you can drop.

 

Oeps... wrong answer. Oké I then understand that you have select the currency "Australian Dollar" and want to show the Symbol: "A$". 

 

Oke then get this column from your related SP list or if it's not there then add it as a column to the list.  And add this to you Combobox, so you can reference the combobox as explained earlier.

 

Or/And ClearCollect() on the related SH List.

ClearCollect(CurrencySym, MyCurrencySPlist})

Then you are sure that the schema, datatype and values are the same as in your Combobox and the LookUp() will work.

 

 

Hope this helps.

 

Paul

2 REPLIES 2
KroonOfficeSol
Level 10

Re: powerapps look at local table and show another column of matching row

@arichards

 

First: next time format your formula (in this case this wasn't needed, but with other formula's this wil help) and place them in a code box. See in the menu the </> sign.

 

Oke on your question:

You have a combobox or dropdown in the datacard where he people select the currency, is this correct?

 

Then you can just reference this control selected value like

YourComboBox.Selected.CurrencySymbolField

Or on change off this combobox put it in a variable and use this on the labels. Like

UpdateContext({YourCurrencyVariable: YourComboBox.Selected.CurrencySymbolField})

 

So basically the CurrencySym collection you can drop.

 

Oeps... wrong answer. Oké I then understand that you have select the currency "Australian Dollar" and want to show the Symbol: "A$". 

 

Oke then get this column from your related SP list or if it's not there then add it as a column to the list.  And add this to you Combobox, so you can reference the combobox as explained earlier.

 

Or/And ClearCollect() on the related SH List.

ClearCollect(CurrencySym, MyCurrencySPlist})

Then you are sure that the schema, datatype and values are the same as in your Combobox and the LookUp() will work.

 

 

Hope this helps.

 

Paul

Community Support Team
Community Support Team

Re: powerapps look at local table and show another column of matching row

Hi @arichards,

Could you please share more details about the error message within your app?

Could you please share a bit more about the Currency TypeNew column in your SP list? Is it a Choice type column?

I have created a SP list on my side, the data structure as below:1.JPG

Note: The Currency TypeNew column is a Choice type column, the available values are Australian Dollar, United States Dollar, Canadian Dollar, etc. The Cost is a Number column.

Based on the formula that you provided, I think there is something wrong with it.

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:2.JPG

 

3.JPG

Set the OnVisible or OnStart property of the first screen of your app to following:

ClearCollect(
    CurrencySym,
    {Currency: "Australian Dollar", Symbol: "A$"},
    {Currency: "United States Dollar", Symbol: "$"},
    {Currency: "Canadian Dollar", Symbol: "C$"},
    {Currency: "Great Britian Pound", Symbol: "£"},
    {Currency: "Euro", Symbol: "€"},
    {Currency: "Chinese Yuan", Symbol: "¥"},
    {Currency: "Zambian kwacha", Symbol: "ZK"},
    {Currency: "Singapore Dollar", Symbol: "S$"},
    {Currency: "Japanese Yen", Symbol: "¥"},
    {Currency: "chilean Peso", Symbol: "$"}
)

Set the Text property of the Label control within the Cost Data card to following:

LookUp(CurrencySym,Currency = DataCardValue6.Selected.Value, Symbol)

Note: The DataCardValue6 represents the Combo Box control within the Currency TypeNew Data card.

On your side, you should type the following formula:

LookUp(CurrencySym,Currency = DataCardValueX.Selected.Value, Symbol)

Note: The DataCardValueX represents the Combo Box control within your Currency TypeNew Data card (in your Edit form). 

The GIF screenshot as below:Test1.gif

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 42 members 3,942 guests
Please welcome our newest community members: