Forum Discussion

Deleted's avatar
Deleted
Apr 05, 2019

PowerApps - IF OR With a Date

I have an IF OR that keeps a Submit button set to "DisplayMode: Disabled" until all fields satisfy the conditions when checking if text controls are blank or not numeric. It will then make the "DisplayMode: Edit" so the form can be submitted. This is working.

 

If(Or( IsBlank(txtClientNameSignature), IsBlank(txtProposalNameSignature), IsBlank(txtSignatureNameRequired), !IsNumeric(txtNumDocsToSign.Text), IsBlank(txtDocumentNames) ), DisplayMode.Disabled, DisplayMode.Edit) 

 

However, when I add a check for dpkrDueDateSignature.SelectedDate < Today()+15 it will still allow button to be in Edit mode even if date condition is not met. 

 

If(Or( IsBlank(txtClientNameSignature), IsBlank(txtProposalNameSignature), IsBlank(txtSignatureNameRequired), !IsNumeric(txtNumDocsToSign.Text), IsBlank(txtDocumentNames), dpkrDueDateSignature.SelectedDate < Today()+15 ), DisplayMode.Disabled, DisplayMode.Edit)

 

Any recommendations are appreciated.

 

  • Deleted's avatar
    Deleted
    Apr 08, 2019

    Resolved. Solution in bold.

     

    If(Or( IsBlank(txtClientNameSignature), IsBlank(txtProposalNameSignature), IsBlank(txtSignatureNameRequired), !IsNumeric(txtNumDocsToSign.Text), IsBlank(txtDocumentNames), dpkrDueDateSignature.SelectedDate < DateAdd( Today(), 15, Days) ), DisplayMode.Disabled, DisplayMode.Edit)

  • Anyone know how to resolve this issue? Recommendations appreciated.

    • Deleted's avatar
      Deleted

      Resolved. Solution in bold.

       

      If(Or( IsBlank(txtClientNameSignature), IsBlank(txtProposalNameSignature), IsBlank(txtSignatureNameRequired), !IsNumeric(txtNumDocsToSign.Text), IsBlank(txtDocumentNames), dpkrDueDateSignature.SelectedDate < DateAdd( Today(), 15, Days) ), DisplayMode.Disabled, DisplayMode.Edit)

Resources