cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

Sharepoint and vLookup question

Hi there, 

 

I hope someone could point me in the right direction:

 

I have two share point lists

1. States

2. Prices

 

In the SPL prices I have a column for every state in the US

In the SPL States I have Each state with their correspondent value.

 

What I need is: 

If I have a column named "CA" a formula that gets the value form the SPL States and multiply by the item value. See screen shot below.

 

Thanks in advance for any help.

 

Picture1.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sajarac ,

Do you list your 'Prices' list records using Gallery control in your app?

Do you want to calculate the 'Value Per State' Text Box based on the selected State value within the Dropdown box?

 

I assume that you listed your 'Prices' list records using Gallery control in your app, and the "Select State" Dropdown is outside the Gallery, is it true?

 

I have made a test on my side, please consider take a try with the following workaround:

1. Add a Gallery control in your app, set the Items property to your 'Prices' list data source.

2. Add three Text Input Boxes (Items Text Box, Value Text box and 'Value Per State' Text Box) within the Gallery, set the Default property of the Items Text Box to following:

ThisItem.Items

set the Default property of the Value Text Box to following:

ThisItem.Value

set the Default property of the 'Value Per State' Text Box to following:

"$" & LookUp(States, State = StateDropdown.Selected.Value, Value) * ThisItem.Value

Note: The Currency type field would be acted as Number type within PowerApps app. Currently, Currency data type is not supported in PowerApps app.

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @sajarac ,

Could you please share a bit more about your scenario?

Do you want to populate your SPL prices with values retrieved from the SPL States multiply by the corresponding item value?

Further, could you please share more details about the "Value" column, "CA" column, "CO" column, .... in your SPL prices? Are they all Currency type column?

 

Based on the needs that you mentioned, I think the ForAll function and Patch function could achieve your needs. I assume that the  "Value" column, "CA" column, "CO" column, .... are all Currency type column in your SPL prices, please take a try with the following workaround:

1. Create a Blank app, then add your two SP List data sources (Prices & States) in it.

2. Add a "Submit" button in your app, set the OnSelect property to following:

ForAll(
       RenameColumns(Prices, "Items", "Items1", "Value", "Value1"), // Prices represents your SPL Prices
       Patch(
              Prices,
              LookUp(Prices, Items = Items1),
              {
                CA: LookUp(States, State = "CA", Value) * Value1,   // States represents your SPL States
                CO: LookUp(States, State = "CO", Value) * Value1,
                CT: LookUp(States, State = "CT", Value) * Value1,
                FL: LookUp(States, State = "FL", Value) * Value1,
                IA: LookUp(States, State = "IA", Value) * Value1,
                IN: LookUp(States, State = "IN", Value) * Value1,
                KS: LookUp(States, State = "KS", Value) * Value1
              }
       )
)

Please consider take a try with above solution, check if the issue is solved.

Note: I assume that the "Value" column, "CA" column, "CO" column, .... in your SPL prices configured as below:

5.JPG

 

 

Best regards,

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.

Hi, thank you very much for your prompt response,

 

Sorry let me try to explain again I have a dropdown list with the states, each state their own State value. see the screenshot.

 

Regards

 

Picture1.png

Hi @sajarac ,

Do you list your 'Prices' list records using Gallery control in your app?

Do you want to calculate the 'Value Per State' Text Box based on the selected State value within the Dropdown box?

 

I assume that you listed your 'Prices' list records using Gallery control in your app, and the "Select State" Dropdown is outside the Gallery, is it true?

 

I have made a test on my side, please consider take a try with the following workaround:

1. Add a Gallery control in your app, set the Items property to your 'Prices' list data source.

2. Add three Text Input Boxes (Items Text Box, Value Text box and 'Value Per State' Text Box) within the Gallery, set the Default property of the Items Text Box to following:

ThisItem.Items

set the Default property of the Value Text Box to following:

ThisItem.Value

set the Default property of the 'Value Per State' Text Box to following:

"$" & LookUp(States, State = StateDropdown.Selected.Value, Value) * ThisItem.Value

Note: The Currency type field would be acted as Number type within PowerApps app. Currently, Currency data type is not supported in PowerApps app.

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (80,991)