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 / Power App to Sharepoin...
Power Apps
Answered

Power App to Sharepoint Form

(0) ShareShare
ReportReport
Posted on by 24

I have a Power App connected to a Sharepoint form and am having issues with the correct fields populating when the date range is selected. The team enters a date range and then fields become enabled depending on this range. Ex. If my Start Date was January 1,2023 to June 30,2023 I would expect January - June Fields to become enabled. However, right now June - December become enabled instead. Below is the formula being used when I select the January card. Any help is appreciated!

 

//Parent.DisplayMode
If(DataCardValue10.Selected.Value="Variable Monthly Savings (Enter Quantity)" ,
If(DateDiff(DataCardValue6.SelectedDate,DataCardValue7.SelectedDate, TimeUnit.Months) >= 0,DisplayMode.Edit, DisplayMode.Disabled), DisplayMode.Disabled)

 

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

    Hi @Bryanna ,

     

    Do you want to set cards of January to June are editable when the Start Date is from January to June?

    Please try this:

    If(DataCardValue10.Selected.Value="Variable Monthly Savings (Enter Quantity)" ,
    If(Month(DataCardName.SelectedDate)>=1&&Month(DataCardName.SelectedDate)<=6,DisplayMode.Edit, DisplayMode.Disabled), DisplayMode.Disabled)

     

    Best regards,

    Rimmon Li

  • Bryanna Profile Picture
    24 on at

    Hi,

     

    Yes, cards show up as editable depending on the start and end date selections.

     

    How would I format it though if someone can do any combination of months. So they can enter something for January through March, January through December, March through December, etc.

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Bryanna ,

     

    I assume your cards look like this:

    vmengmlimsft_0-1694066857617.png

    Please try this:

    For Visible of each card:

    //JanuaryCard
    !IsBlank(LookUp(Sequence(DateDiff(DatePicker3.SelectedDate,DatePicker4.SelectedDate,TimeUnit.Months)+1,Month(DatePicker3.SelectedDate)),Value=1))
    //FebruaryCard
    !IsBlank(LookUp(Sequence(DateDiff(DatePicker3.SelectedDate,DatePicker4.SelectedDate,TimeUnit.Months)+1,Month(DatePicker3.SelectedDate)),Value=2))
    .
    .
    .
    //DecemberCard
    !IsBlank(LookUp(Sequence(DateDiff(DatePicker3.SelectedDate,DatePicker4.SelectedDate,TimeUnit.Months)+1,Month(DatePicker3.SelectedDate)),Value=12))

     

    Best regards,

    Rimmon Li

  • Bryanna Profile Picture
    24 on at

    Looks like i am getting an error on the ! ....any thoughts?

    Bryanna_0-1694098083272.png

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

    Hi @Bryanna ,

     

    Please try this:

    If( !IsBlank(
     LookUp(
     Sequence(
     DateDiff(
     DateCardValue6.SelectedDate,
     DateCardValue7.SelectedDate,
     TimeUnit.Months
     ) + 1,
     Month(DateCardValue6.SelectedDate)
     ),
     Value = 0
     )
    ),DisplayMode.Edit,DisplayMode.Disabled)

    vmengmlimsft_0-1694158118499.png

     

    Best regards,

    Rimmon Li

  • Bryanna Profile Picture
    24 on at

    that worked!! thank you so much!

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard