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

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
Highlighted
Helper V
Helper V

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

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.
Highlighted
Helper V
Helper V

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.

 

Highlighted
Helper V
Helper V

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,963)