Hi,
I have list called ndaBusinessUnits that has 4 columns. (screenshot attached)
ndaBUSU - Single Line of Text
ndaBUSUResponsiblePrimary - People or Group
ndaBUSUResponsibleSecondary - People or Group
ndaBUSUResponsibleTertiary - People or Group
The app (attached) has a dropdown that displays all rows in column ndaBUSU
Distinct([@ndaBusinessUnits], ndaBUSU)
What I need to achieve is that based on the selected dropdown (Custom Card - Allowed Values) value the ndaBUSUResponsiblePrimary, ndaBUSUResponsibleSecondary, ndaBUSUResponsibleTertiary are populated with the values (Display Name / Email) from the same row.
What is the best way to achieve this ?
Many Thanks
Darren
Perfect!!
Changing the primary text did the trick.
I have uploaded the solution to the question for anyone else who may encounter a similar issue.
Thank You so much.
Hi @marsdendd ,
Based on the formula you modified, I think there is something wrong with it. The DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox is required to provided a Record value, but the LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary).Email would return a Text value.
Please set the DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox to following:
If(
!IsBlank(ndaBUSUDropdown.Selected.Result),
LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary),
Parent.Default
)
If you want the email of the selected person to be also displayed as display value within the ndaBUSUResponsiblePrimary ComboBox, I afraid that there is no way to achieve your needs. Please note that -- only Primary text column could be used as display value within the ndaBUSUResponsiblePrimary ComboBox.
Best regards,
Hi Kris,
Thank You!
I was making an error in my approach. I was putting my code in the items property which meant I had to manually select the dropdown to populate the field.
The provided solution is almost perfect however I still have a small issue. The remaining issue is the display name is displayed not the email.
I enclose 2 screenshots.
Using the code you provided I tried adding the .Email to ndaBUSUResponsiblePrimary).Email
As you can see the email is resolved (DisplayName-Err.png) but does not display in the field.
Darren
Hi @marsdendd ,
Based on the needs that you mentioned, I think the LookUp function could achieve your needs.
I have made a test on my side, please consider take a try with the following workaround:
Set the DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox to following:
If(
!IsBlank(ndaBUSUDropdown.Selected.Result),
LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary),
Parent.Default
)
Set the DefaultSelectedItems property of the ndaBUSUResponsibleSecondary ComboBox to following:
If(
!IsBlank(ndaBUSUDropdown.Selected.Result),
LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsibleSecondary),
Parent.Default
)
Set the DefaultSelectedItems property of the ndaBUSUResponsibleTertiary ComboBox to following:
If(
!IsBlank(ndaBUSUDropdown.Selected.Result),
LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsibleTertiary),
Parent.Default
)
Please consider take a try with above solution, check if the issue is solved.
Best regards,