cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fless1
Advocate I
Advocate I

Null value for Date Variable

setting  varDate=datepicker.selecteddate but want to set varDate to be blank if a tick box "No date required" is selected

 

but set(varDate,"") comes up with "imcompatible type" error

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

Hi @fless1,

check this out https://powerusers.microsoft.com/t5/General-Discussion/Update-blank-Null-value-to-fields-Date-User-C...

it may be the answer you are looking for. If it works, please mark this thread as solved.

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

Hi @fless1,

check this out https://powerusers.microsoft.com/t5/General-Discussion/Update-blank-Null-value-to-fields-Date-User-C...

it may be the answer you are looking for. If it works, please mark this thread as solved.

Thanks loads
cbrazenec
New Member

Instead of "", use Date(Blank(),Blank(),Blank()).  Sets it to null value, but in a date format.

takolota
Memorable Member
Memorable Member

None of these answers worked for me and I really did not want to recreate the date columns in separate text columns.

I had to use this formula on the submit button:

SubmitForm(Form1); If(Or(IsBlankOrError(DataCardValue8.SelectedDate), IsBlankOrError(DataCardValue9.SelectedDate)), RecordsRetentionSetNullDates.Run(RecordsRetentionList.Selected.ID, IsBlank(DataCardValue8.SelectedDate), IsBlank(DataCardValue9.SelectedDate)), "");

 

And set up a corresponding flow to input those null values in the date fields.

takolota_0-1646780447245.png

 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,863)