I have a Sharepoint list with all of our employees. In Power Apps, you can select an employee from the list to initiate their Offboarding. When the name is selected (form: NewOffboarding_1) and the form submitted, I have the following assigned to the submit buttons OnSelect:
Hi @BCBuizer I think I had other issues in my code. I rebuilt the form from scratch and all is working fine now. Thanks for your help!
Hi @StaceyGriffeth ,
Are you asking because a new record gets created instead of the expected existing one? The DefaultMode property of NewOffboarding_1 may play a role there, unless of course you are manually setting the FormMode anywhere in your app.
@BCBuizer Of course!
Is there a setting that would be causing it to create a new record, rather than updating the select (existing) record?
Hi @StaceyGriffeth ,
Can you please also share a screenshot, including the tree view, of the DataCard, especially the Update property? I'm starting to run out of ideas as to why this is not working as expected, so I hope that may yield some clues.
@BCBuizer yes, I confirmed the field is Yes/No type
On further investigation, it's correctly setting this field value in the SP list, however it is not setting it for the selected name, it is creating an entirely new record and setting the value on it.
Hi @StaceyGriffeth ,
The Default property doesn't play a role here, so we can leave that out of the equation.
Are you sure the column type is Yes/No and not Choice with "Yes" and "No" as possible options?
Hi @BCBuizer ok, I understand now. I added that data card to the form, set it's Visible property to false, and set the Update property to true. However, when I submitted the form, it did not update the "OffboardingStarted" field value to be "Yes". I'm wondering if the data card's Default value should be changed? It is currently "ThisItem.OffboardingStarted".
Hi @StaceyGriffeth ,
Indeed, I forgot to mention to make the DataCard invisible after by setting its' Visible property to false. Like this the field gets updated upon form submission.
Hi @BCBuizer sorry, I'm not following. The form is literally just the selected employee name. But when that name is submitted, I want the other field OffboardingStarted to be set to Yes. OffboardingStarted shouldn't actually be visible anywhere to the user.
Hi @StaceyGriffeth ,
In case the OffboardingStarted should always be set to "Yes", you can just add the field to the form, remove all controls from the DataCard and then set the DataCard.Update property to true.
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional