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

Start new form without editing new field.

Dear Community,

 

 I have spent my whole yesterday to find the solution but couldn't.

I have multiple questions

I have a form, where the datasource and target is a sharepoint list.

I have 3 different fields (lookup, combo box and text input (this is the most)).

What i do:

1. Submit(Form1) - to submit the request

1a: OnSuccess (Navigate to screen3)

2. On Screen3 i have a start a new form button which: NewForm(Form1);Navigate(EditScreen2, None);ResetForm(Form1)

 

What i want to achive:

I would like to keep few fields to be filled from the previous submit, but delete/reset the rest of the fields.

 

What i have tried so far:

I have created a ResetCheckBox variable and added to those fields 'Reset' part what i want to reset on a new request.

Created a new button on the Screen3 (Called 'New Request with the previous data'), added this command:
NewForm(Form1);Navigate(EditScreen2,None);UpdateContext({ResetCheckbox:true});UpdateContext({ResetCheckbox:false})

 

But it is not working. What should be the solution?

 

My second problem:

I have one Lookup datacard field, where the datasource is a Choice list from the Sharepoint list. How can i set a default value for that or avoid to reset from the previous submit?

 

Thank you

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Start new form without editing new field.

Hi @Janaboy

 

About 1st question:

 

For example, you can set below formulas in the dropdown control of choice column data card to keep the previous selected option:

Dropdown1.DefaultSelectedItems={'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id:EditForm1.LastSubmit.choice,
  Value:EditForm1.LastSubmit.choice.Value}

For 2nd question:

Likewise, set below formulas in the Dropdown control of lookup column data card:

Dropdown1.DefaultSelectedItems={'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:EditForm1.LastSubmit.Lookup.Id,
                        Value:EditForm1.LastSubmit.Lookup.Value}

Regards,

Mona

 

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Skilled Sharer
Skilled Sharer

Re: Start new form without editing new field.

@Janaboy 

 

First Problem: If you want to pre-filled the field from your previous data, then you can use the ID of previous record and sets the default value with lookup function.

 

Second Problem; You can set the defualt value of lookup field when the formmode is new and ID is blank.

 

Highlighted
Helper I
Helper I

Re: Start new form without editing new field.

Hi @v-monli-msft , 

 

Thanks for the exampels, can you please help me out wiht Lookup field and Textinput field examples as well?

Where i have to put that? Into the 'Default' ?

 

Thank you 

Highlighted
Community Support
Community Support

Re: Start new form without editing new field.

Hi @Janaboy ,

 

I have already give the formula to use in the lookup column in my first reply. Please check.

 

For textinput control, just set the text you want to use in Text property of the textinput control like:

TextInput1.Text="Words you want to say here."

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper I
Helper I

Re: Start new form without editing new field.

Hi Monli,

 

Thanks, it did not work, but i don't have time now to working on this 😞

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,333)