cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
loopingmurdock
Helper IV
Helper IV

Save datepicker to collection

Am trying to save a date from a date-picker to a collection.

Here is my attempt:

ClearCollect(
    Questionaire,
    {   Manager_COLUMN: 'DRP_Manager-Selection_Manger_Section'.Selected.Login,
        Collaborateur_COLUMN: 'DRP_Collaborateur-Selection_Manger_Section'.SelectedText.Title,
        Nb_de_PDS_COLUMN: Value('TXT_PDS-Vus_Manager_Section'.Text),
        Duree_COLUMN: 'DRP_Duree-Selection_Manager_Section'.Selected.Value,
        Evaluation_COLUMN: 'DRP_Evaluation-Score_Question_1'.Selected.Value,
        Commentaire_COLUMN: 'TXT_Commentaire-Box_Question_1'.Text,
        Date_Validation_COLUMN: DatePicker_Manager_Section
    }

 Date-picker being the last one in the code.

I tried .SelectedDate but error.

Thank you for your helps.

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Is there any other place in your app where you Collect data into the Questionaire collection?

To verify if this is related to the above, if you collect the data into new collection (say Questionaire2), do you still see the same error?

ClearCollect(
    Questionaire2,
    {   Manager_COLUMN: 'DRP_Manager-Selection_Manger_Section'.Selected.Login,
        Collaborateur_COLUMN: 'DRP_Collaborateur-Selection_Manger_Section'.SelectedText.Title,
        Nb_de_PDS_COLUMN: Value('TXT_PDS-Vus_Manager_Section'.Text),
        Duree_COLUMN: 'DRP_Duree-Selection_Manager_Section'.Selected.Value,
        Evaluation_COLUMN: 'DRP_Evaluation-Score_Question_1'.Selected.Value,
        Commentaire_COLUMN: 'TXT_Commentaire-Box_Question_1'.Text,
        Date_Validation_COLUMN: DatePicker_Manager_Section
    }
)

 

 

View solution in original post

4 REPLIES 4
timl
Super User
Super User

@loopingmurdock 

What error message do you get when you reference DatePicker_Manager_Section.SelectedDate ?

Given type are incompatible, when i type this in the collect()

Date_Validation_COLUMN: DatePicker_Manager_Section.SelectedDate
timl
Super User
Super User

Is there any other place in your app where you Collect data into the Questionaire collection?

To verify if this is related to the above, if you collect the data into new collection (say Questionaire2), do you still see the same error?

ClearCollect(
    Questionaire2,
    {   Manager_COLUMN: 'DRP_Manager-Selection_Manger_Section'.Selected.Login,
        Collaborateur_COLUMN: 'DRP_Collaborateur-Selection_Manger_Section'.SelectedText.Title,
        Nb_de_PDS_COLUMN: Value('TXT_PDS-Vus_Manager_Section'.Text),
        Duree_COLUMN: 'DRP_Duree-Selection_Manager_Section'.Selected.Value,
        Evaluation_COLUMN: 'DRP_Evaluation-Score_Question_1'.Selected.Value,
        Commentaire_COLUMN: 'TXT_Commentaire-Box_Question_1'.Text,
        Date_Validation_COLUMN: DatePicker_Manager_Section
    }
)

 

 

The error came from my Patch() from an other code, but thank to your help that made me look

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,749)