Im struggling to understand why my field is not getting populated on a new sharepoint form:
#('Regions' is a separate List to control the assigment of Countries to Regions)
#Country Field
DefaultSelectedItems:
If(
'Form_Certification_Process_Basic-Info'.Mode=FormMode.New;
{
Value: Office365Users.UserProfileV2(User().Email).country
};
Parent.Default
)
Items:
Filter(
('Regions');!IsBlank(Country)
).Country
#Region Field
DefaultSelectedItems:
If(
'Form_Certification_Process_Basic-Info'.Mode=FormMode.New;
{
Value: LookUp('Regions'; Country = Country_DataCardValue.Selected.Country;Region.Value)
};
Parent.Default
)
Items:
Choices([@'Regions'].Region)
So the country Field gets populated with the Country of the currently logged in User. This works as intended.
But somehow the Region Field stays empty when i start or reset the form. - however it has a value when I change or update the Country field (can be the same value). Can someone explain why? Do i have to add some sort of delay until my Country field is populated?