web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / I have manually create...
Power Apps
Unanswered

I have manually created a date field called as Acceptance Date that should be greater than the SharePoint auto created date, what would be the condition to achieve this ?

(0) ShareShare
ReportReport
Posted on by 76

I have created a power app field as below & I want this Acceptance field should only accept the date on or after the SharePoint created date which gets created after every entry automatically - User can not able to select the date before they created on SharePoint.

 

Acceptance date >= SharePoint auto created date.

 

Kuma0002_0-1701786194402.png

 

Categories:
I have the same question (0)
  • Kuma0002 Profile Picture
    76 on at

    This requirement is need in Power Apps platform.

  • BCLS776 Profile Picture
    8,994 Moderator on at

    If you're using a form control in Edit mode, consider setting the DisplayMode property of the submit buttonand perhaps make visible a warning label or fill, if this condition is true:

    DatePicker1.SelectedDate < ThisItem.Created

     In the button that contains your SubmitForm(), change the DisplayMode property to:

    If(DatePicker1.SelectedDate < ThisItem.Created,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    Hope that helps,

    Bryan

  • Kuma0002 Profile Picture
    76 on at

    Many Thanks for your swift reply.

    I want to achieve this without disturbing to my Submit() button & also want to display the warning message when user violates that.

    Can same formula get work using the Onselect Property with formula as:

    DataCardValue16.selecteddate < ThisItem.Created

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Yes, a different way to handle this is to toggle a variable that controls the Visible property of a warning message.

     

    In the OnChange property of the date picker put:

    If(Self.SelectedDate < ThisItem.Created,
     UpdateContext({varWarningVisible: true}),
     UpdateContext({varWarningVisible: false})
    )

    Then, in the Visible property of a warning message, such as a Label, put:

    varWarningVisible

    Bryan

  • Kuma0002 Profile Picture
    76 on at

    Thanks for your reply @BCLS776.

    It would be great if you could help with one more query-

    I have one more date field called "Info Received from Supplier".

    If Acceptance Date is there (Filled) then field "info received from supplier" should be greater than Acceptance Date, If Acceptance date is blank then "info received from supplier" should be greater than created Date.

  • BCLS776 Profile Picture
    8,994 Moderator on at

    You can use the conditions to control the original warning message or another one too. Your description above would work out to a condition like:

     

    (!IsBlank(ThisItem.'Acceptance Date) && ThisItem.'Info Received From Supplier' > ThisItem.'Acceptance Date') ||
    (IsBlank(ThisItem.'Acceptance Date) && ThisItem.'Info Received From Supplier' > ThisItem.CreatedOn)

     

    Bryan

  • Kuma0002 Profile Picture
    76 on at

    How can we implement both the less than and greater than condition using one formula like 

    1) Created Date <= Acceptance Date <= Today (); Acceptance Date should be greater than equal to the Created date but less than equal to the Today's date.

    2) a) When Field 'Infor Received from Supplier' is filled:

            Acceptance Date <= 'Info received from Supplier' <= Today's Date

        b) When Field 'Infor Received from Supplier' is Blank:

           Created Date <= 'Info received from Supplier' <= Today's Date

     

    Kindly help me in implementing this requirement. Would be great help. Thank you.

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Item 1 works out to:

    (ThisItem.'Acceptance Date' >= ThisItem.CreatedOn) && (ThisItem.'Acceptance Date' <= Today())

    Item 2a works out to:

    !IsBlank(ThisItem.'Info Received from Supplier') && (ThisItem.'Info Received from Supplier' >= ThisItem.'Acceptance Date') && (ThisItem.'Info Received from Supplier' <= Today())

    Item 2b doesn't make sense to me. If 'Info received from Supplier' is blank, the expression could never be evaluated to true

     

    Maybe you have a try at 2b and I can proofread?

     

    Bryan

     

  • Kuma0002 Profile Picture
    76 on at

    Hi Bryan,

     

    First of all, thank you so much for your support!

     

    Actually, there is some correction in my last reply.

    One thing - I have input the above formula but that is not working for me, I have used that formula on ONChange property. Actually, my requirement is once the supplier submit the Power App form on SharePoint then I need to edit the same received data on SharePoint customize form and edit the SP customize form to enter the "Acceptance Date" and "Info received from Supplier" as per above requirement.

     

    1) Created Date <= Acceptance Date <= Today (); Acceptance Date should be greater than equal to the Created date but less than equal to the Today's date.

     

    2) a) When Field 'Acceptance date' is filled:

            Acceptance Date <= 'Info received from Supplier' <= Today's Date

        b) When Field 'Acceptance date' is Blank:

           Created Date <= 'Info received from Supplier' <= Today's Date

     

    Sharing the snap to understand better.

     

    Kuma0002_0-1702649281015.png

    Kuma0002_1-1702649356768.png

     

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Conditions of the kind we've been talking about can be used in lots of different ways, for example:

    • To control the DisplayMode of a button so that a user can't press it unless the conditions are true
    • To control the visibility of an error message or fill highlight to indicate to the user that information is missing or not correct
    • To control the actions the app takes when a behavior property (one that starts with "On") is activated

    You can think of more. The way you use these conditions comes down to what you want the user experience to be for your app. If information is critical for the functioning of the solution, I lean towards a strict "user cannot proceed until information is correct" experience. If the info is "nice to have", then a gentle warning that doesn't stop submission may be more appropriate.

     

    It's really up to how you want to do it,

    Bryan

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 254 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 211 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard