Hi, I'm customizing the form in Sharepoint using Power Apps and I'm trying to notify users that if their leave balance is insufficient, they cannot save/create the item with a message that will be displayed like the formula below.
The Leave Balance list has all Number columns.
Whenever the user chooses any of the leave types, it will check if the leave type balance in the leave balance list and whether the days applied are enough to apply.


This is on SharepointIntegration.OnSave. I try this way but has errors. How to fix it?
If(DataCardValue1.Selected.Value = "Annual Leave" < DataCardValue15 And DataCardValue1.Selected.Value="Calamity Leave" < DataCardValue15,false);
SubmitForm(SharePointForm1);
ResetForm(SharePointForm1);
RequestHide();
Thank you.