cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Make my field get the correct value!

Hi,

I am using customise forms not standalone powerapps on a SharePoint list.

I have three different views. View/Edit/New. All with the same fields.

 

Problem:

When I click on the New button in SharePoint to open a new form, none of the fields clear.

When I click on the Edit button none of the fields inherit the values of the item I've selected.

 

Attached is a picture of the form.

 

How it's set up:

I've followed this tutorial to it's completion: https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

That means that SharePoint Integration property is set up like this:

OnNew = Set(SharePointFormMode, "CreateForm"); NewForm(Form1_1); Navigate(CreateScreen, ScreenTransition.None)

OnEdit = Set(SharePointFormMode, "EditForm"); EditForm(Form1_2); Navigate(EditScreen, ScreenTransition.None)

OnView = Set(SharePointFormMode, "ShowForm"); ViewForm(Form1); Navigate(ShowScreen, ScreenTransition.None)

 

The Name field has the Default property set as Parent.Default

The External Contact field (is a people picker field on the SharePoint list) has the Items property set as Choices(BEMSJobsList.External_x0020_Contact) the name of the SP list

The External Contact field has the Default property set as ThisItem.External_x0020_Contact

The Building Associated and Building Type fields get their data from an external list.

The Building Associated field has the Items property set as 'Building list'.'{Name}'

The Building Associated field has the Default property set as ThisItem.Building_x0020_Associated

The Building Type field has the Items property set as Filter('Building list',Title=Dropdown1.Selected.Value) (this works well btw)

 

Can anyone help?

 

Still pulling hair.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Make my field get the correct value!

Hi Michael,

 

I think I've found a solution (it is now behaving like it should for now).

For each form in each screen, the property for Item was not set to If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First('YourListName'),SharePointIntegration.Selected)

I changed it to this and it started working. Somehow along the way this was lost. Now it's found and I'm not tearing hair out anymore.

Thanks,

C

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Make my field get the correct value!

Have you followed the Step 5:

"

Step 5: To handle the form submission and reset correctly, we update the formula for OnSave & OnCancel. We use the variable created in Step 4 to decide which form to submit or reset.

We set the following formulas on SharePointIntegration control:

  • OnSave - If(SharePointFormMode="CreateForm", SubmitForm(CreateItemForm), If(SharePointFormMode="EditForm", SubmitForm(EditItemForm)))

  • OnCancel - If(SharePointFormMode="CreateForm", ResetForm(CreateItemForm), If(SharePointFormMode="EditForm", ResetForm(EditItemForm)))

"

Further, make sure you have the screen renamed properly.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Make my field get the correct value!

Hi Michael,

 

Yes I've followed step 5 completley and my screens are named and consistent through formulas.

My problem isn't with saving or cancelling, it's with clicking New or editing an item. The form is not clearing the fields for a new form and not showing the values in the fields when editing an item.

 

Re: Make my field get the correct value!

Hi Michael,

 

I think I've found a solution (it is now behaving like it should for now).

For each form in each screen, the property for Item was not set to If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First('YourListName'),SharePointIntegration.Selected)

I changed it to this and it started working. Somehow along the way this was lost. Now it's found and I'm not tearing hair out anymore.

Thanks,

C

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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