Last active
January 14, 2025 00:51
Revisions
-
dennythecoder revised this gist
Jan 14, 2025 . 1 changed file with 28 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,30 @@ # Populate Field with Current User Requires **'Office365Users'** Connector. What I'm doing here is prepopulating a field on an item form that references a people column in a SharePoint list. #### Named formulas ```javascript CurrentUser = Office365Users.MyProfileV2(); CurrentUserPhoto = Office365Users.UserPhotoV2(CurrentUser.mail); CurrentUserObject = { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", Claims: "i:0#.f|membership|" & CurrentUser.mail, Department: CurrentUser.department, DisplayName: CurrentUser.displayName, Email: CurrentUser.mail, JobTitle: CurrentUser.jobTitle, Picture: CurrentUserPhoto }; ``` #### Item Form For the DataCardValue combobox that selects a person, under **DefaultSelectedItems**: ``` If(ItemForm.Mode = FormMode.New, CurrentUserObject, Parent.Default) ``` -
dennythecoder created this gist
Jan 14, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # Populate Field with Current User Requires 'Office365Users' Connector.