Hey @PytByt
I inserted those variables just to show where to place the values. You can do it with those variables, which you'll first need to set up somewhere by doing the following:
Set( vNameUser, "Name of the user to check on")
Set(vSiteName, "site name to put in new record")
You can initialize these in the OnVisible property of a screen, or on an action of elements like the OnSelect of a button. If you have a form with TextBoxes and a button to check and submit, you could put the next on the OnSelect property of that button:
Button: OnSelect =
Set( vNameUser, TextBoxCandidateName.Text)
Set(vSiteName, TextBoxSiteName.Text)
Or if you're only using texboxes with the values in it, you could use 'textBox.Text' instead, like this:
If (
Not(IsEmpty( LookUp (SP_List, candidate_name = vNameUser))),
Patch ( SP_List,
Defaults( SP_List),
{
candidate_name: textBoxCandidateNaeme.Text
site_name: textBoxSiteName.Text
}
),
//Add functionality to refuse the continuation
)
Depends on how you check and where you get the values from. Let me know if something does not work.