cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FailSafe
New Member

Submit form as current user

I just want to submit the filled out form as the user currently logged in / editing the form. Do I need to edit the Items line or something?

Bonus: I would also like to Submit a form where the form is not present and filled out for the currently logged in user, so no reference of data cards or forms. I just want to change data for the logged in used based on OnSelect functionality.

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

You need to have some way to uniquely identify the record and bind it to the form if you want to use Submit form.  As you said that is normally done using a Gallery and the selected property.  But you can also do it using a Lookup() if you have a value that can be used to identify a particular item.  The simplest form of that is if you know the Item ID number.  Then the Item property of the form is.

Lookup(sharepointlist,ID=theIdNumber)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

16 REPLIES 16
WarrenBelz
Super User III
Super User III

HI @FailSafe ,

The logged in user will be the person in the Modified by in the line item (unless it is changed again). Are you storing the data in another field as well? For the second question, you cannot change the Modified by from the logged-in user if that is what you are meaning.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Pstork1
Dual Super User III
Dual Super User III

One clarification on what @WarrenBelz posted.  You can't change the Modified By using Power Apps, but you can change the Modified By using a Http REST call in a Power Automate flow.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I'm doing:

OnVisible

 

UpdateContext({CurrentUser:User().Email})

 

For the HomeScreen / First Screen. But it doesn't seem to carry into other screens.

Pstork1
Dual Super User III
Dual Super User III

Context variables are scoped to a particular screen.  If you want to use CurrentUser on other screens set a Global variable instead

 

Set(CurrentUser, User().Email)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I tried going the Power Automate route only to be infuriated by a looping issue of "Apply to Each" when trying to Create Item within Sharepoint list when adding an Initialized Variable to insert data into the list.

Submitting the form with this spawns entries for all users in the list. 4 of them for each user actually.

Pstork1
Dual Super User III
Dual Super User III

Unfortunately, If you want to control system fields like Modified By its the only way.  Not sure what your issue was with Create Item and loops, but if you post it in the Power Automate forum we can help figure it out.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

Could you explain a bit more about what you are trying to do?  As @WarrenBelz mentioned when you submit a form in Power Apps the record is created in the Data Source As Created by or Modified by the user who is running the Power App.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

What I'm attempting to do is SubmitForm as the currently logged in user for OnSelect when a button is pressed. I would also like to predefine a SubmitForm process when another button is pressed. but I don't want it too specific to my immediate need because I want to know how to generally do this in the future using other inputs/data. I've googled enough that I could make a hidden combo/select box and have this taken care of super easy, but I'm stubborn.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (54,357)