cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amber_L
Helper III
Helper III

setting a choice value based off a label

Hey guys, below is my current design:

Amber_L_1-1624418123825.png

 

Green section is a View Form, Pink section is a Gallery, Blue section is a New Form.

Green Section is attached to data source 1.

Pink and Blue section is attached to data source 2

I have a lookup field in data source 2 that links to the ID of items in data source 1

 

Essentially, the blue and pink section works as a comment system and these 'comments' are stored in a separate list but referenced via the ID of the item from data source 1.

 

The send icon will submit the form in the blue section. I am trying to set the default selected item for the blue section to be the ID from the green section however cant seem to get it to work.

 

I tried the following:

on the Default Selected Item property = [DataCardValue14.Text]

or [Text(DataCardValue14)]

 

with DataCardValue14 being the label that shows the ID for the green section (however I have set the visible property to false)

 

This wont register as a value when submitted to the list?

Amber_L_2-1624418602058.png

 

Could I please have some help? Im not sure why it isnt working.

 

Cheers, Amber

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I have managed to get this to work by just removing the lookup column and setting it as a number column and setting the default value to be that of the ID from data source 1. This works for what I am needing so will use this instead. Thanks for your help anyway!

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @Amber_L ,

 

I did a demo for you.

1\ This is my list LIST136. It is similar to your data source 1.

vxiaochenmsft_0-1624428289756.png

 

2\ This is my list LIST137. It is similar to your data source 2.

vxiaochenmsft_1-1624428622896.png

 

vxiaochenmsft_2-1624428982675.png

vxiaochenmsft_3-1624429083287.png

vxiaochenmsft_4-1624429134234.png

Set the datacard's Update property to:

{Id:DataCardValue2.Text}

vxiaochenmsft_5-1624429189779.png

Set the datacard's Visible property to:

false

 

3\ The result is as follows:

vxiaochenmsft_6-1624429253943.png

vxiaochenmsft_7-1624429268942.png

 

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

 

 

 

 

 

hey there, I have tried exactly what you have done and it still wont pull that value through? is there anything else i may be missing?

I have managed to get this to work by just removing the lookup column and setting it as a number column and setting the default value to be that of the ID from data source 1. This works for what I am needing so will use this instead. Thanks for your help anyway!

View solution in original post

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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