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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,860)