@JoseC12
I would recommend, for simplicity, to simply enable or disable (and possibly display a "date error" message, or even limit your dropdown of dates to only those dates that are not available). In other words, why have a user fill out something and then when they submit...then get an error? Do it before they go through the submit process by just disabling the button.
So, moving forward, looking over your formulas and your prior post, it seems like you are dealing with a date conversion issue. I do not have a sense of what the 'TEAM MEMBER' column is, but I assume it is a Lookup or Choice column since you reference it with a .Value. The same goes for the 'SERVICIO' column since you reference it also with the .Value. So, I'll assume that to be the case and correct.
Consider changing your formula to this:
If(
IsBlank(
Lookup(TAREA;
'TEAM MEMBER'.Value = Input_TeamMemberTarea.Selected.Value &&
FECHA = DateValue(Input_FechaTarea.Selected.FECHA) &&
SERVICIO.Value = Input_Servicio.Selected.Value
)
);
SubmitForm(Form_PlanearTarea);; UpdateContext({varShowCrearTarea:false, varShowMensajeConfirmacionCrearPlanTarea:true})
)
You seemed to show most of your issues around the Input_FechaTarea control and converting that to a DateValue, so if you still see those errors, please check the items property of that dropdown.
ALSO...the error you saw in the other posting (your last reply) is not unusual to see. When you do a "bad" date comparison in the designer with SharePoint, it gets into a "mode" that it will just complain on and on about it. The answer to that is to save and close the designer, then reopen and edit the app. If you are still doing a "bad" comparison, you will get the message again. You'll need to fix the issue, then save, close, reopen until the error is gone.
Taking the above and using my first statement about just disabling the button...you could put this in your DisplayMode property of the submit button:
If(
IsBlank(
Lookup(TAREA;
'TEAM MEMBER'.Value = Input_TeamMemberTarea.Selected.Value &&
FECHA = DateValue(Input_FechaTarea.Selected.FECHA) &&
SERVICIO.Value = Input_Servicio.Selected.Value
)
);
Edit;
Disabled
)
Then, your OnSelect of the button would be simply:
SubmitForm(Form_PlanearTarea);;
UpdateContext({varShowCrearTarea:false, varShowMensajeConfirmacionCrearPlanTarea:true})
There is no need to perform the lookup again in the submit because the user would never have been able to click the button if the date was in use.
I hope this is helpful for you.