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 / How to set a variable ...
Power Apps
Unanswered

How to set a variable to update a sharepoint column based on a selection made in Power App

(0) ShareShare
ReportReport
Posted on by 20

Hi there,

Very new to developing Power Apps

From my Power App I have where a request can be made for two different things (teacher aide funding hours) from a drop down. Based on the selection different costs will occur. I want my sharepoint to update in the cost column automatically based on the selection made (e.g. 100 hours selected cost column will update to $2000 automatically vs 200 hours selected cost column will update to $4000 automatically).

What will my variable look like and how will this also look in my patch?

Thanks heaps for your help 

Categories:
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @mccowatts ,

    I am assuming $20 per hour is the standard rate for all ? You did not say what the Items of your drop-down were, but if the hour number was the part before the first space, it would be (note .Value may be different depending on the Items)

    Value(
     First(
     Split(
     ComboBoxName.Selected.Value,
     " "
     )
     ).Result
    ) * 20

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • mccowatts Profile Picture
    20 on at

    Thanks @WarrenBelz 

    The first drop down item is for 100 hours and second item is for 200 hours. 

    100 hours selected needs to update the sharepoint figure column to $2041.74

    and 200 hours selected from the drop down needs to update the sharepoint figure column to $4083.48

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @mccowatts ,

    Just multiply by 20.4174 instead of 20

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • mccowatts Profile Picture
    20 on at

    Still confused sorry 

    so my two variables look like this? 

    mccowatts_0-1674699982069.png

    and then how would that look in my patch? column name in sharepoint list is Teacher_Aide_AmountNZD_GSTexcluded

  • mccowatts Profile Picture
    20 on at

    Set(
    varPGFTARequest100,
    Value(
    First(
    Split(
    drpPGFTAFundingAmount.Selected.Value,
    "One term (100 hours total)"
    )
    ).Result
    ) *2041.74
    );
    Set(
    varPGFTARequest200,
    Value(
    First(
    Split(
    drpPGFTAFundingAmount.Selected.Value,
    "Two terms (200 hours total)"
    )
    ).Result
    ) *4083.48

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @mccowatts ,

    The First(Split was assuming (as I noted) you had "100" at the start of the string - it will not work where you have it now 

    Value(
     Left(
     First(
     Split(
     ComboBoxName.Selected.Value,
     "("
     )
     ).Result,
     3
     )
    ) * 20.4174

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard