SOLVED

PowerApps - IF OR With a Date

Contributor

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.

 

2 Replies

Anyone know how to resolve this issue? Recommendations appreciated.

best response confirmed by cgtrman (Contributor)
Solution

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)