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 / Sharepoint and vLookup...
Power Apps
Answered

Sharepoint and vLookup question

(0) ShareShare
ReportReport
Posted on by 3,284

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

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

  • Sajarac Profile Picture
    3,284 on at

    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

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard