cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmowry
Helper I
Helper I

Submit Form adding data to hidden fields

I have a power app that i have connected to a Azure sql db. Upon submitting the form, I'd like to fill in some fields that are not displayed on the form (Created, Modified, CreatedBy, ModifiedBy). I also want to link the values to a forigen key so that they get brought up correctly on the search page. 

 

For the Created By and Modified By, I'd like to take the context of the person filling out the form. 

 

I can't seem to find what I'm looking for in my research, anyone point me in the right direction?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@dmowry 

For simplicity, you might want to consider putting those hidden fields in your form and then setting the Visible property of the DataCard to false.

Then in your Update property of the data card for those fields, put the formula for the value you want.  For example, if the CreatedBy and Modified fields are text fields, then use User().FullName or whatever else you want to go in there.

This way, when you submit, those values will be put into your data source.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@dmowry 

For simplicity, you might want to consider putting those hidden fields in your form and then setting the Visible property of the DataCard to false.

Then in your Update property of the data card for those fields, put the formula for the value you want.  For example, if the CreatedBy and Modified fields are text fields, then use User().FullName or whatever else you want to go in there.

This way, when you submit, those values will be put into your data source.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,873)