My SharePoint List Form is retaining a default value from a form submission

  • My SharePoint List Form is retaining a default value from a form submission

    Posted by DSC Communities on July 10, 2019 at 10:04 am
    • Carolee Heynen

      Member

      July 10, 2019 at 10:04 AM

      Suddenly today all the fields in my Power App present with a default value pulled from one of the test entries and I don’t know how to zero it out.

      Most of the fields simply have a Default value = to the test entry, while the formula is Parent.Default

      Value remains

      Here is one that has a formula in “Default” but is still showing a value in the Properties panel…Ā  How do I fix this?

      Default value 12345
      I have been manually entering Blank() for Default, which seems to work… But is this even the right syntax?
      Is this the right syntax?
      On a related note: How can I make the toggle clear the values in the two columns to the left when it is turned off?

      ——————————
      Carolee Heynen
      SharePoint & Office 365 Admin / Developer
      ——————————

    • Carolee Heynen

      Member

      July 10, 2019 at 10:07 AM

      Here’s a better shot of the first scenario…

      Where is this coming from?

      ——————————
      Carolee Heynen
      SharePoint & Office 365 Admin / Developer
      ——————————
      ——————————————-

    • Brian Scott

      Member

      July 11, 2019 at 7:15 AM

      I may need some clarification – don’t you want the values to come from the list if they already exist?
      On the toggle, you should be able to use an IF in the default value to check the state of the toggle and then set to either the default or zeroĀ  depending on the state of the toggle.

      ——————————
      Brian Scott
      Chief Creative Officer
      Concord NC
      ——————————
      ——————————————-

    • Carolee Heynen

      Member

      July 11, 2019 at 7:28 AM

      But up until yesterday when I went to edit the form in PowerApps, the fields were blank.  Shouldn’t the edit process, when I go to it from the list ribbon “customize forms” shouldn’t the form and not from editing a specific item, show a blank form?

      Mine shows up completely populated with values that seem to be hard coded into the “Default” of each field… And are from a test entry that I have since deleted

      Look at “Default”

       

       

       

      ——Original Message——

      I may need some clarification – don’t you want the values to come from the list if they already exist?
      On the toggle, you should be able to use an IF in the default value to check the state of the toggle and then set to either the default or zeroĀ  depending on the state of the toggle.

      ——————————
      Brian Scott
      Chief Creative Officer
      Concord NC
      ——————————

    • Paul Van Beek

      Member

      July 11, 2019 at 8:34 AM

      Generally, when you open a form to edit a new record, you should do a NewForm(<FormName>), that resets the item object used by the form to a new item.Ā 

      On most of the forms I’ve worked on, the datacards for the controls have default values ofĀ  “ThisItem.<datafieldname>”. Calling NewForm resets ThisItem to a new blank object for your datasource, and fills the properties of the ThisItem object with the default values for the fields from your datasource.

      ——————————
      Paul Van Beek
      ——————————
      ——————————————-

    • Carolee Heynen

      Member

      July 11, 2019 at 8:56 AM

      Thanks Paul,

       

      I am obviously very new to all of this and I appreciate your input.  My datacard controls seem to usually have a default setting of Parent.default…  does that seem right?

       

      ——Original Message——

      Generally, when you open a form to edit a new record, you should do a NewForm(<FormName>), that resets the item object used by the form to a new item.Ā 

      On most of the forms I’ve worked on, the datacards for the controls have default values ofĀ  “ThisItem.<datafieldname>”. Calling NewForm resets ThisItem to a new blank object for your datasource, and fills the properties of the ThisItem object with the default values for the fields from your datasource.

      ——————————
      Paul Van Beek
      ——————————

    • Brian Scott

      Member

      July 12, 2019 at 7:40 AM

      That is the norm for a form in “Edit” mode – that will get the current value from the item in the list.

      ——————————
      Brian Scott
      Chief Creative Officer
      Concord NC
      ——————————
      ——————————————-

    • Carolee Heynen

      Member

      July 12, 2019 at 8:43 AM

      Thank you for your response.

       

      I have not communicated properly, it seems.  I am not trying to edit an item in the SharePoint list.  I am trying to edit the form itself, in PowerApps, accessing the Studio via the “Customize Forms” link in the ribbon of the list. 

       

      In any case, I seem to have been able to get back to a working state by deleting all the items in the list and then going to customize. 

       

       

      ——Original Message——

      That is the norm for a form in “Edit” mode – that will get the current value from the item in the list.

      ——————————
      Brian Scott
      Chief Creative Officer
      Concord NC
      ——————————

    • Laura Rogers

      Member

      July 12, 2019 at 9:40 AM

      Hi Carolyn,
      When you customize a SharePoint list form with PowerApps, while you’re designing the form, it will always have the data in it, of the first item in your SharePoint list.Ā  Here’s how to see where that is automatically set up.Ā  Select your form control (it’s usually called SharePointForm1), and take a look at the property called “Item”.Ā  There, you’ll see the code, that’s basically telling it to show whatever item is currently selected in SharePoint, and if nothing is selected, show the first item in the SharePoint list.

      __________________________________________________

      Laura Rogers MVP SharePoint Server

      Owner, IW Mentor http://www.iwmentor.com

      http://www.wonderlaura.com – Twitter: @WonderLaura

      Try my FREE PowerApps 5 day email course!

      ——————————
      Laura Rogers, Microsoft MVP
      Owner at
      ——————————
      ——————————————-

    DSC Communities replied 6 years, 1 month ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘My SharePoint List Form is retaining a default value from a form submission’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!