Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Leave Enrollments record cannot be created

Hi all,

I'm building a PowerApp, and part of it requires a Leave Enrollment record to be made and associated to a Worker record. Unfortunately, I'm having trouble creating it.

Using SubmitForm('FormName') doesn't actually create a record or return any errors, it just fires OnSuccess and does nothing.

I tried using the Patch function instead, but ran into a strange issue - it told me the issue was the fact that the 'Accrual Frequency' field isn't part of the record I'm creating (even though according to documentation, there is no 'Accrual Frequency' field in the Leave Enrollment entity). I created a custom Option Set and field to compensate, but then when I attempted to include it in the Patch function it informed me that the column does not exist.

Screenshot of the errors shown when hovering over the Patch function.Screenshot of the errors shown when hovering over the Patch function.Not sure where to go from here, so I'm looking for any suggestions. Is this an issue with the environment?

Thanks in advance!


Kind regards,

Ciara Lynch

Community Support
Community Support

Hi @CiaraL ,


To better understand your issue:

1. Do you mean the type of 'Accrual Frequency' field is Option set?

2. It seems that you use combo box(or dropdown) to select 'Accrual Frequency' , right? Can you share the items property of it?

3. Are all these errors related to Accrual Frequency' field?


I have made a test on my side, please refer to my example:

If you use a combo box to select 'Accrual Frequency', the items property of combo box should be:

Choices('Leave Enrollment'. 'Accrual Frequency' )

And modify that part of formula as below

'Leave Enrollment':customAccrualFrequencyValue.Selected.Value,

Please have a try and check if your issue is fixed.

Best regards,


If this post helps, then please click on “Accept as Solution” to help the other members find it more quickly.


Hi Sik,


1. Yes, the type of the 'Accrual Frequency' field is an Option Set.

2. Yes, I created an Option Set and accompanying field (called 'Custom Accrual Frequency'), here is an image of the items property:


3. I believe there was an issue with the way I was setting up the Leave Plan field value I was submitting. I changed the formula to 'Accrual Frequency': customAccrualFrequencyValue.Selected.Value, and the remaining errors are that the Accrual Frequency column doesn't exist and that the function 'Patch' has some invalid arguments.


When I remove the Accrual Frequency part from the Patch function, the errors disappear, but unfortunately the record still isn't being made when I test the app. 

There could be an issue with the 'Leave Plan' part of the formula, as I'm using a LookUp function to try and return a Leave Plan ID.

> 'Leave Plan': LookUp('Leave Plans', Name in leavePlanValue.Selected.Name)


Thank you for your response!


Kind regards,


Hi @CiaraL ,


It is really weird that the system always can't find the column. Have you ever changed name 'Accrual Frequency' field? Can you go to check the Name of field in Entity -Field, and use Name instead of display name in formula?

Annotation 2019-10-28 104731.png

To your 'Leave Plan' part of formula, if possible, i think you can also delete the that part to check if the lookup makes error . If it is true that there is something wrong with the lookup function, please share more details, e.g. field type, related controls.

Best regards,


Hi Sik,


I did a bit more digging into the problem last Friday, and found that after some changes to the formula I was able to actually make records. I found them using PowerBI, and they seem to be the same record (same Leave Enrollment Number). I've inserted an image of what I patch as part of creating the Leave Enrollment record, and the resulting records in PowerBI.



I use this formula to find the last Leave Enrollment Number and increment the number part by 1, could this be the issue?


Concatenate("LEAVEENROLL000",(Text(Value(Substitute(Last('Leave Enrollments').LeaveEnrollmentNumber, "LEAVEENROLL",""))+1)))




Frequent Visitor

I forgot to add that these records aren't being pushed to Talent, so the Worker is never actually assigned to the specified Leave Type.

Helpful resources

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!


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 (37,348)