In the past I've used these codes to get a choice made from a collection of emails to work, no problem:
Update property of Data Card:
If(
IsBlank(DataCardValue19.Selected);
Blank();
{
Claims: "i:0#.f|membership|" & DataCardValue19.Selected.UserPrincipalName;
DisplayName: "";
Mail: DataCardValue19.Selected.UserPrincipalName;
Department: "";
Picture: "";
JobTitle: ""
}
)
Default of DataCard
{Mail:ThisItem.'NAME OF COLUMN'.Email}
DefaultSelectedItems of Combobox
LookUp(COLLECTIONofemails; UserPrincipalName = ThisItem.'NameOFCOLUMN'.Email)
All of them together allow for the email to save on the list, and remain saved (not dissapearing) when you go into edit mode.
My problem is that I have something new that I have no idea how to tackle:
I have 9 collections for the 9 departments of the company, each with different emails depening on the people on the company. It all depends of what you Department you choose in DataCardValue11. Have no idea how to tackle this big conditional both in the ComboBox and also in the Update property of the DataCard. Tried with "If" but no luck. Also tried instead of coing the collection route, connecting to an Excel table that holds all the emails sorted by department. But had no luck here (i could sort the name of people depending on the Department in the Combobox, but then if I wrote in the Update of the DataCard "Selected", it told me it was receiving a Table type of data, and it was expecting a Record type).
So.... How would you go out about this?
I tried also changing the Items property with "Or" and "Switch" functions but coulnd't get it to work as it told me it expected to receive boolean type of data.