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

Create a new blank record

Hi,

Currently, If I create a new record in my app, fields are already populated, I would like to be able to create a new record where all fields are blank, text, dropdown etc, so the user is prompted to select or enter a value

 

Any assistance is greatly appreciated...

 

Thanks

Geoff

 

 

3 ACCEPTED SOLUTIONS

Accepted Solutions


@Geoff100 wrote:

Hi,

I am not sure if I fully understand, I have an auto-generated app based on a SharePoint list. Do I set the Default property of the edit screen to FormMode.New...?

 

As an example, I have a field on the edit screen

The card is called "Shift: and the Default property = ThisItem.Shift

the dropdown within the card is called Dropdown_Shift and its default = Parent.Default

 

So in the event, a user clicks on the + button in the gallery I would like to present the user 

all fields blank, so they must select

 

Thanks

Geoff

 


This info helps me understand better -- thanks. Using the auto-generated app, do the following steps to open a form in FormMode.New:

  • Add the + symbol to the menu bar at the top of the DetailScreen1
  • Right click on EditScreen1 and select Duplicate. A new screen should be created called EditScreen1_1 
  • In the OnSelect property of the new + icon put: NewForm(EditForm1_1);Navigate(EditScreen1_1, ScreenTransition.None)

This creates a form that is ready to accept new inputs. You may wish to modify the cards shown on this form as well as their Default and Update properties to suit the info you want to go back into your Sharepoint list.

 

How does that work?

 

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

Oh, I forgot to mention on dropdowns, the AllowEmptySelection property must be set to true to allow a blank default state; otherwise, it will self-select the first value from Items.

For a "Select One..." type of default choice, there are a few ways to do it - see this thread. However, with dropdowns it is always some sort of workaround to make that text display. With a combobox, there is a property called InputTextPlaceholder that does exactly what you're after, so changing to that kind of control might be the solution for you.

 

 

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

Geoff100
Helper I
Helper I

Hi BCLS776,

Updated all dropdowns to combo boxes and found them far easier to work with. I like the fact that the user can search available values. I was also able to set "Select..." as the default value.

 

Many Thanks

Geoff

View solution in original post

11 REPLIES 11
BCLS776
Super User
Super User

It sounds like you are using a form, so I'll run with that assumption.

 

First, make sure the form is in DefaultMode=FormMode.New by using the NewForm() function. This preps the form control to make a new record.

 

If that doesn't clear values from coming up automatically, then you will need to edit the Default property of each card/control in the form that you want to override. Defaults can come from the underlying data source, a parent control, or some other value from within the app.

If there are specific ones you need help with, please post info on here about the control and what is currently in the Default property for it and for its parent card.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Geoff100
Helper I
Helper I

Hi,

I am not sure if I fully understand, I have an auto-generated app based on a SharePoint list. Do I set the Default property of the edit screen to FormMode.New...?

 

As an example, I have a field on the edit screen

The card is called "Shift: and the Default property = ThisItem.Shift

the dropdown within the card is called Dropdown_Shift and its default = Parent.Default

 

So in the event, a user clicks on the + button in the gallery I would like to present the user 

all fields blank, so they must select

 

Thanks

Geoff

 


@Geoff100 wrote:

Hi,

I am not sure if I fully understand, I have an auto-generated app based on a SharePoint list. Do I set the Default property of the edit screen to FormMode.New...?

 

As an example, I have a field on the edit screen

The card is called "Shift: and the Default property = ThisItem.Shift

the dropdown within the card is called Dropdown_Shift and its default = Parent.Default

 

So in the event, a user clicks on the + button in the gallery I would like to present the user 

all fields blank, so they must select

 

Thanks

Geoff

 


This info helps me understand better -- thanks. Using the auto-generated app, do the following steps to open a form in FormMode.New:

  • Add the + symbol to the menu bar at the top of the DetailScreen1
  • Right click on EditScreen1 and select Duplicate. A new screen should be created called EditScreen1_1 
  • In the OnSelect property of the new + icon put: NewForm(EditForm1_1);Navigate(EditScreen1_1, ScreenTransition.None)

This creates a form that is ready to accept new inputs. You may wish to modify the cards shown on this form as well as their Default and Update properties to suit the info you want to go back into your Sharepoint list.

 

How does that work?

 

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Geoff100
Helper I
Helper I

Thanks for the assistance this joined a lot of dots for me........

Hi,

If I duplicate the Edit form and navigate from the browse gallery + button, the new form populates with the first record in the SharePoint List, how to I create a blank new form...?

 

Any help appreciated

 

Thanks

Geoff


@Geoff100 wrote:

Hi,

If I duplicate the Edit form and navigate from the browse gallery + button, the new form populates with the first record in the SharePoint List, how to I create a blank new form...?

 

Any help appreciated

 

Thanks

Geoff


The form has a property called Item, and there is probably something in there. Try clearing that out.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hi,

The Item property associated with the EditForm1_1 is blank, however, creating a new form still populates

all fields (dropdowns) on the form

 

Thanks

Geoff

 

OK, each dropdown & card associated with the form will have a Default property that sets the initial value of the dropdown. Often the Default of the dropdown is set to Parent.Default, which means it inherits the default from the card it is within. You can clear those Default properties or set them to another desired value if you like.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hi BCLS776,

I have 3 dropdowns that reference lists for their values, I have cleared the default values on each card and on both dropdown controls. They still appear to reference the first record in their respective lists., I would like to have a default value like "Select..."

 

Thanks

Geoff

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,829)