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 / Is it possible to chan...
Power Apps
Answered

Is it possible to change date in sharepoint list based on choice selected from dropdown?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I am looking for ways, Is it possible to change date in sharepoint list based on choice selected from dropdown? leadtime added to today based on the selection of material.

 

Example, i have a list of material & their leadtime days needed by supplier to deliver to us

Today is 10.11.2020, when a material is choosen, example glass is choosen 10.11.2020 + 2 days  = 12.11.2020

I have 3 columns in sharepoint list, Material, Leadtime & Date column.

Material                          Leadtime

glass                               +2 days

hardened glass              +9 days

glass with film               +4 days

painted glass                 +10 days

mirror                            +3 days

sandblasted mirror       + 6 days

 

is it possible have such functions? please suggest me possibilities & formulas i can use either in sharepoint or in the powerapps customized form.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,896 Most Valuable Professional on at

    Hi @Anonymous ,

    Assuming you have a drop-down from a choices column for your materials, this should set the values you need

    UpdateContext(
     {
     vLeadTime:
    	 Switch(
     YourMaterialDD.Selected.Value,
     "glass", 
     2,
     "hardened glass",
     9,
     "glass with film"
     4,
     "painted glass",
     10,
     "mirror"
     3, 
     "sandblasted mirror"
     6
     )
     }
    );
    UpdateContext(
     {
     vLeadDate:
     DateAdd(
     Today(),
     vLeadTime,
     Days
     )
     }
    );
    Reset(YourLeadTimeControl);
    Reset(DateControl)

    then the Default of Lead Time Control

    If(
     vLeadTime>0,
     vLeadTime,
     Parent.Default
    )

    the DefaultSelectedDate of Lead Date Control

    If(
     vLeadDate=Blank(),
     Parent.Default,
     vLeadDate
    )

    The at Screen OnVisible and/or at the end of your save code

    UpdateContext(
     {
     vLeadDate:Blank(),
     vLeadTime:0
     }
    )

     

    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.

     

  • Verified answer
    WarrenBelz Profile Picture
    155,896 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard