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

A field with Combobox in Editform, how to show result in Viewform

Hi, 

 

I am creating a form, it can be viewed(Viewform) and edited(Editform).

I have a field called "Optional Viewers" that is a Lookup field and connects to a "Lookup table", in that field, I would like to do multi-choices.

So I manually change the Datacard value in Editform to a "Combobox" input.

But when I back to the Viewform, how do I let the value showed?

 

I have tried

1)

Item = Choices(ComboBox.SelectedItems)

2)

Item = ThisItem.'Optional Viewers'

 This one gave me the error that shows "Expected Text Value"

 

3)

Concat(ComboBox.SelectedItems, Result & ",")

 This one will get one more period at the end of the record, and in "Update" function

DataCardValue.Text

it will give me the error "Expected Record Value"

 

This field will be used as a viewer filter.

 

Is there any idea or any suggestion I can try?

 

Thanks!

 

4 REPLIES 4
RandyHayes
Super User III
Super User III

@HCLin 

There are several factors to what you are trying to change.

1) The property you want to focus on in order to view the selections is going to be the DefaultSelectedItems property.

2) The Items property of the Combobox will remain the same - your Lookup list.

3) Your Item property that you refer to (I assume this is the form Item property) should be the record of the list that you are viewing or editing.

 

Your update property of the Datacard should provide a table of records for Lookup columns.  This will be highly dependent on the Items property of your Combobox.  If it is the datasource of your looked up list, then you will need to implement a formula such as this in your Update property:

ForAll(yourCombobox.SelectedItems, {Id: ID, Value:Title})

This assumes that the Lookup column is defined in SharePoint is using the Value of Title.

 

If the above doesn't provide the direction to take, then post back with the Items and DefaultSelectedItems property of the Combobox, also the Default and Update property of the DataCard.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

 

Thanks for your reply, I am using Common Data Service, and I found an issue, the original idea is that I would like this "Optional Viewers" field as "Choices" (can do multiple selections) type, but from a "Lookup table"

 

In CDS, there is a field type called "Lookup", and also a type called "Choices" but the options of this type are manually input and hardcode, I want the "Choices" type but options from Lookup table.

 

*For now, I set the field as Lookup type, and manually change the input as Combobox in the app, but found out that in my CDS record, it still can only save One record but not multiple.

 

Do you have any idea about this issue?

 

Thanks a lot!

RandyHayes
Super User III
Super User III

@HCLin 

I don't have a lot of exposure to the CDS in regard to Lookup as they are not on my work plate at this time.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you for your effort and feedback, @RandyHayes.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,706)