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

Simply Checkbox that add data from entity1 to entity2

checkexample.PNG

 

Is there any simple code that when I check on any box then ML101-1 is automatically added to the editform cardvalue?

 

Thanks in advance!

 

11 REPLIES 11

Hi @tofsweden,

OK.

Under the Multi-line TextInput DataCard of Entity, choose to unlock, then add a gallery with items property configured with Entity2.

Then switch the Entity 2 gallery record control (mostly here should be Label control ) into CheckBox control, keep only the CheckBox control, and switch the Value to the proper field, when this is done, the field value (in your scenario should be  ML101 field ) would be shown under CheckBox.Text.

After that, configure the CheckBox within Entity 2 Gallery OnCheck and OnUnCheck property.

OnCheck

 

Collect(DataUse,Table({Value:Checkbox.Text&Char(13) & Char(10)}))

 

OnUnCheck

Remove(DataUse,{Value:Checkbox.Text&Char(13) & Char(10)})

DataUse is a collection created to store the selected value, it is neither entity1 nor entity2.

 table({Value:CheckBox.Text&Char(13)&Char(10)})

As explained above, Checkbox.text should be the field value, here we combine this value with Char(13) and Char(10), which is used to carriage return (CR) and Line Feed (LF).

In order to display multi-selection into a Multi-line Text Inputbox, here we use the 

Concat(DataUse,Value)

Under the Default property of the Multi-Line TextInput for Entity 1.

Concat () function would combine all value from the selected column in a table into One string, in order to make it display in seperate line, Char(13) and Char(10) are used as the Value part.

Post back if you have any further questions.

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-micsh-msft

 

Fantastic, thanks for your elaborate explaination. Now I understand CRLF and creating custom collection on PowerApps side. Thank you

 

Regards

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (73,472)