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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,513)