cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Form Submission On an user

Hi

I want to create a form in which a custom user  gives inputs and when he clicks submit button ,the entered values in he form Should submit against database.

 

Current Approach:I  have 3 text boxes and one Button ,When i enter the text and click on a submit button it should  populate the values inside the database.

 

 

4 REPLIES 4
mdevaney
Super User III
Super User III

@Anonymous
Can you please clarify two things for me?

1. What is meant by “Custom User”

2. How would the form look/behave differently from how it is now. Screenshots would be helpful.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Anonymous
Not applicable

Lets consider  this ,

 

An empty form with following fields

 

Name,JoiningDate ,manager

 

When i enter the above  details from a form it should save to Database when i click on a button.

 

 

 

 

 

 

 

 

@Anonymous
Are you just looking for the code to submit the form? If those controls are in and Edit Form You can use this code in the OnSelect property of your button.

SubmitForm(your_form_name);

If they are not in a form put this code in the OnSelect property. Change the fieldnames to match your datasource and the control names to match your controls.

Patch(
your_datasource_name,
Defaults(your_datasource_name),
{
fieldname1: TextInput_Employee.Text,
fieldname2: TextInput_Manager.Text,
fieldname3: TextInput_Department.Text,
fieldname4: DatePicker_Date.SelectedDate
}
)

——
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
poweractivate
Super User II
Super User II

@Anonymous 

 


@Anonymous wrote (emphasis added):

...  gives inputs and when he clicks submit button ,the entered values in he form Should submit against database.

... When i enter the text and click on a submit button it should  populate the values inside the database.

 

 


You refer to "the database" and "submit against database".

 

What is this "database" to which you are referring exactly?

Also, if the database is Common Data Service, what is the Entity you are trying to "submit against"?

If the data source is something else, please provide the relevant details.  

 

We would suggest you post more detail regarding what is your current data source on the PowerApp.

 

If you do not currently have a data source, that is part of your problem.

Without a data source, you would have nothing to submit against.

 

You would go to "Data Sources" (use database looking icon on left) and add a data source.

Then go to select the form and under "Data source", choose the data source you just added under "In your app".

 

InYourApp.png

 

 

We recommend Common Data Service as the data source.

 

Also, you can do this another way:  go to select the form directly from your screen where the form is, and under "Data source" you can choose the data source from there to add under "Entities" or "Connectors".

 

 

 

 

 

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 (15,153)