cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Filling fields in a form by pressing a button

Hi, what I'm trying to accomplish is having a button "Reset" that when is pressed, it does fill some of the fields in a form, I tried by using a variable in the OnSelect property of the button :

Set(_var;!_var)

 

the variable is a boolean of course, and in the DataCardValue Default property I put this :

If(_var = true; "17,00"; _var = false; Parent.Default)

 

So when the variable is true it will show the 17,00 value, when false it shows the value from the source, which is a SharePoint List at the moment.

But when the 17,00 value is displayed, if I submit the form (with a "Save" button), the value on the list does not change.

 

With this Reset button I am supposed to put this value(which is always the same) in the field/fields(which will always be the same aswell), then submit the form, and then Refresh the source :

If(_var = true; "17,00"; _var = false; Parent.Default);;

SubmitForm(formName);;

Refresh(listSP)

 

Thanks for any help/suggestions!

 

ProNewbie

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Filling fields in a form by pressing a button

Hey @ProNewbie 

 

I carried out a test on my side and this works as expected. I am able to store the values in my SharePoint list.
 
Configuration :
 
Field -> Default Property - > If(_var = true;"17,00";_var = false; Parent.Default)
Reset Button -> OnSelect -> Set(_var;!_var)
Submit button OnSelect -> SubmitForm(FormName)
 
Are you getting any errors? Please share more details so might help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Filling fields in a form by pressing a button

The Datafield and (Displayname also) were wrong, puff, how embarrassing.

 

Any way thanks for the help 😄

 

ProNewbie

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User III
Dual Super User III

Re: Filling fields in a form by pressing a button

Hey @ProNewbie 

 

Can you please share more details about the Update property of this data card? The control where you are displaying this value should be there in the "Update" property. Also, what is the type of field that you are trying this value to?
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Advocate II
Advocate II

Re: Filling fields in a form by pressing a button

Hi @yashag2255 , the Update property of the DataCard is "DataCardValue55.Text" which is the DataCardValue I was talking about previously, the type of data is Text, on the SharePoint list is Single Line Text, on PowerApps also all DataCardValues have the Form property set to "TextFormat.Text".

Also in all fields there will be only numbers with commas.

 

ProNewbie

Highlighted
Dual Super User III
Dual Super User III

Re: Filling fields in a form by pressing a button

Hey @ProNewbie 

 

I carried out a test on my side and this works as expected. I am able to store the values in my SharePoint list.
 
Configuration :
 
Field -> Default Property - > If(_var = true;"17,00";_var = false; Parent.Default)
Reset Button -> OnSelect -> Set(_var;!_var)
Submit button OnSelect -> SubmitForm(FormName)
 
Are you getting any errors? Please share more details so might help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Filling fields in a form by pressing a button

ok, I tried on a testapp with another sp list and it works for me too.

I guess there is a problem with the SharePoint list in some area of my app.

I'll try to figure out what is preventing the sp list from being updated,

 

thanks

 

ProNewbie

 

EDIT : nevermind, is just this field which is not being submitted

Highlighted
Advocate II
Advocate II

Re: Filling fields in a form by pressing a button

The Datafield and (Displayname also) were wrong, puff, how embarrassing.

 

Any way thanks for the help 😄

 

ProNewbie

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,837)