Hi All
I have read that OnStart and especially its use with the Navigate function is set to be deprecated and in its place will be StartScreen. I have code on my OnStart that works just fine, however I have no clue how to Set it up on StartScreen - below is my code:
/ Obtain username and email of the logged-in user
Set(varLoggedInUser, User());
// Find the user with a matching email in the App Users list
With(
{wUserRecord: LookUp(LSS_TRACKER, Uzer.Email=varLoggedInUser.Email)},
Set(varUser, wUserRecord.FullName);
Set(varRole, wUserRecord.LSSRole.Value);
Set (varID, wUserRecord.ID);
Set(CurrentUserFirstName, Office365Users.MyProfile().GivenName);
Set(CurrentUserFullName, Office365Users.MyProfile().GivenName & " " & Office365Users.MyProfile().Surname)
);
// If matching user is not found, insert a new user into the list with the role User
If(IsBlank(varRole),
With(
{wUserRecord:
Patch(
LSS_TRACKER,
Defaults(LSS_TRACKER),
{
LSSPersonName: CurrentUserFullName,
Uzer: {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|"& varLoggedInUser.Email,
Department: "",
DisplayName: varLoggedInUser.FullName,
Email: varLoggedInUser.Email,
JobTitle: "",
Picture: ""
}
}
)
},
Set(varUser, wUserRecord.FullName);
Set(varRole, wUserRecord.LSSRole.Value);
Navigate(NewUser,ScreenTransition.Cover);
),
Navigate(AdminView,ScreenTransition.Fade);
);
How would I adapt this to use StartScreen? I appreciate any and all suggestions!