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

Method to clear field

We created a form to submit nominations which will get saved as list in Sharepoint. We have a field called "Need More Info" which is a text box with multiple lines. If the nominator provides more information as requested, there should be a method to clear what's in the "Needs More Info" Field. Created a button called "Clear" next to it hoping that when clicked it should clear the text in the "Needs More Info" Field with Reset() command. But it expects the default value of "Needs More Info" Field to be blank or "". Currently is it Parent.Default. When I make it " " , it is not displaying the data in the field at all. Any help would be appreciated. New to powerapps.

22 REPLIES 22

Your text box is placed inside a data card. What the code is in that data card's Default property? (usually data card's name looks like yourSharepointColumnName_DataCard1)

@Alex_10 

It is ThisItem.'Information Needed' .. Screenshot below.

 

SS4.PNG

ok looks good. what is your yourForm.DataSource and yourForm.Item properties code?
also what is in 'Information Needed_DataCard2'.Update property?

@Alex_10 

 

Form.Item is DataTable1.Selected

Data Source is the Sharepoint LIst that it points to.

Update property is InformationNeeded.Text. 

that looks fine too. What is in DataTable1.Items property? And DataTable1 is a gallery?

@Alex_10 

 

It was a gallery but recently changed to data table.

 

SS6.PNG

Your form.DataSource = 'Merit Award Nominations'   ?
if yes add after SubmitForm():

 

SubmitForm(YourFormName);
If(!IsBlank(YourFormName.Error),
    Notify("SP error")
);

and press the save button. will it show "SP error" message at the top?

@A_San ,

Back in my timezone now.

This is why I was asking for the Update of the card - you have noted it is 

InformationNeeded.Text. 

This is the field name, not the control name. If you have named the text box the same, change it now as this leads to Ambiguity, otherwise it should be YourTextBoxName.Text

 

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.

@WarrenBelz , Apologies for the delay. I was pulled into something else. 

I am not sure I follow. Could you please explain? I have attached the data card and text input screenshots again for reference.

 

SS7.PNGSS8.PNG

@Alex_10 

Apologies for the delay, I got pulled into something.

I don't see any SP error after I gave those statements.

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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (89,888)