cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mikeMar2
Regular Visitor

Forms and ComboBoxes

Hi, I have a Office365 datacard in my form that I need to also edit the data in another datacard in the same form. I need to get the emails from the selected people in the office365 datacard and I have no problem doing this when the item is initially selected in a new form. In the case of editing a form, I cannot get the default items' emails, I can only grab them from the selected ones. The IsBlank() formula on the selected items returns false but it is only "", not the redacted line as desired.

 
 
 
 
 

pa.png

 

 

 

From the image, the line with the pipe is the "default" data and the line beneath it is the name I want to add to the data. It adds the email fine for the updated data, not the original.

 

All fields in the SQL table are type nvarchar.

 

Here are specifics if needed:

Form: Form1

DataCard: Staff Attorney_DataCard1 which is a text field. Default is set to ThisItem.’Staff Attorney’

DataCardValue14 is a combobox. It’s Items is set toOffice365Users.SearchUser({searchTerm:DataCardValue14.SearchText,top:5}). It’s DefaultSelectedItems is set to If(Form1.Mode<>FormMode.New,{Value: Concat(Split(Parent.Default," | "),Result, " | ")})

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @mikeMar2 ,

Do you mean you cannot get the default email in “Staff Attorney Email” in Edit mode?

Is the default people display well in “Staff Attorney“ field in Edit mode?

How do you populate the email field from the selected people?

Please provide more information(better with screenshots) about your scenario so that I can do a test on my side.

 

Based on your description, I did a test on my side, Email field display well no matter in New mode or in Edit mode. You can refer to my steps:

1. Below are settings for my combo box control(If using your formula, when first open SearchBox and has not selected any person, it will return a default blank table, and the DefaultSelectedItems will not work. So I put searchTerm blank):

v-albai-msft_0-1615361519063.png

v-albai-msft_1-1615361519066.png

2. Set Update property of Staff Attorney_DataCard to:

Concat(ComboBox5.SelectedItems,DisplayName,"|")

v-albai-msft_2-1615361519070.png

3. For the email field, set its Default property to:

Concat(ComboBox5.SelectedItems,Mail,",")

v-albai-msft_3-1615361519073.png

Best Regards,

Allen

View solution in original post

1 REPLY 1
v-albai-msft
Community Support
Community Support

Hi @mikeMar2 ,

Do you mean you cannot get the default email in “Staff Attorney Email” in Edit mode?

Is the default people display well in “Staff Attorney“ field in Edit mode?

How do you populate the email field from the selected people?

Please provide more information(better with screenshots) about your scenario so that I can do a test on my side.

 

Based on your description, I did a test on my side, Email field display well no matter in New mode or in Edit mode. You can refer to my steps:

1. Below are settings for my combo box control(If using your formula, when first open SearchBox and has not selected any person, it will return a default blank table, and the DefaultSelectedItems will not work. So I put searchTerm blank):

v-albai-msft_0-1615361519063.png

v-albai-msft_1-1615361519066.png

2. Set Update property of Staff Attorney_DataCard to:

Concat(ComboBox5.SelectedItems,DisplayName,"|")

v-albai-msft_2-1615361519070.png

3. For the email field, set its Default property to:

Concat(ComboBox5.SelectedItems,Mail,",")

v-albai-msft_3-1615361519073.png

Best Regards,

Allen

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,980)