web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Impossible to collect ...
Power Apps
Unanswered

Impossible to collect Value in a Collection

(0) ShareShare
ReportReport
Posted on by 129

Hi,

 

I have a collection to collect all changes in my gallery and to patch them in my dataverse. I use 2 CheckBoxes, one to know if the value is active, the other if it's a time value and 2 TextInput.

 

It's impossible for me to collect data, 

 

I use this formula :

 

If(
 ThisItem.'Unité (ix_uniteid)' in colTaskUpdatesUnité.'Unité (ix_uniteid)';
 Update(
 colTaskUpdatesUnité; 
 LookUp(
 colTaskUpdatesUnité;
 'Unité (ix_uniteid)' = ThisItem.'Unité (ix_uniteid)');
 {
 'Unité (ix_unite)':TextInputCanvas4.Value;
 Activé: CheckboxCanvas3.Checked;
 Coef: Value(TextInputCanvas3_1.Value);
 Temps: CheckboxCanvas3_1.Checked;
 'Unité (ix_uniteid)': ThisItem.'Unité (ix_uniteid)'
 }
 );
Collect(
 colTaskUpdatesUnité;
 {
 'Unité (ix_unite)':TextInputCanvas4.Value;
 Activé: CheckboxCanvas3.Checked;
 Coef: Value(TextInputCanvas3_1.Value);
 Temps: CheckboxCanvas3_1.Checked;
 'Unité (ix_uniteid)': ThisItem.'Unité (ix_uniteid)'
 }
))

 

 

And I have this error:

"Type incompatible. The collection cannot contain a value of this type."

 

I think the CheckBoxes are the problem, but I can't say for sure.

 

Thanks,

Tom Victor

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @TomVictor ,

     

    Do you have something like this which you can replace in the code?

    //Replace
    CheckboxCanvas3_1.Checked
    
    //To this
    CheckboxCanvas3_1.Value

     

    Hope this helps

  • CU22100725-0 Profile Picture
    129 on at

    Hi @Ethan_R ,

     

    Sorry for my late answer, I tried to replace the code but I still can't collect data

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    What's the error @TomVictor ?

     

    Also, hoping that both Checkbox name is correctly mentioned. 

    Also, I'm not sure but wrap then in this: 

    Bool(CheckboxCanvas3_1.Value)

     

    Hope this helps

  • CU22100725-0 Profile Picture
    129 on at

    My error is still the same @Ethan_R :

    "Type incompatible. The collection cannot contain a value of this type."

     

    I tried to wrap them and it just didn't work

  • CU22100725-0 Profile Picture
    129 on at

    I made multiple test and I can get all data exept the Checkboxes one.

     

    So the problem are my CheckBoxes but I can't solve it.

     

    I'd really appreciate your help on this one.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard