cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Janaboy
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
v-monli-msft
Community Support
Community Support

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.
panand99
Solution Supplier
Solution Supplier

@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.

 

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 

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.

Hi Monli,

 

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

 

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (59,043)