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

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 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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,827)