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 III
Super User III

@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

View solution in original post

1 REPLY 1
RandyHayes
Super User III
Super User III

@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

View solution in original post

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

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (40,557)