cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Janaboy
Level: Powered On

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
Community Support Team
Community Support Team

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.
panand99
Level 10

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.

 

Janaboy
Level: Powered On

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 

Community Support Team
Community Support Team

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
Janaboy
Level: Powered On

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 Smiley Sad

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 468 members 5,381 guests
Please welcome our newest community members: