i am working on already existing app that is not migrated to power apps.
I have sharepoint lit with preparedby -single line text and approvedby person field column
on form submission I want to save: preparedby and approvedby the name of the current loggedin user.
I tried to use userName() on set fields value, but it always insert in the format of : i:0#.f|membership|myemail@site.com
How can I format the userName() to give me name of the user.
thanks in advance