Kris,
I have tried, but it doesn`t seem to work.
The code I have on the Register button at current is as follows:
Patch('[dbo].[Visitor_Register]',Defaults('[dbo].[Visitor_Register]'),{FullName: NVS_Name_Input_Text.Text,Company: NVS_Company_Input_Text.Text,Phone: NVS_Phone_Input_Text.Text, Email: NVS_Email_Input_Text.Text, VisitorType: "V", WHS: "NA"})
;
Patch('[dbo].[Visitor_Records]',Defaults('[dbo].[Visitor_Records]'),{FullName: NVS_Name_Input_Text.Text,Company: NVS_Company_Input_Text.Text,Phone: NVS_Phone_Input_Text.Text, Email: NVS_Email_Input_Text.Text, CheckIn:
DateTimeValue( Text( Value( Now() ), "[$-en-US]mm/dd/yyyy hh:mm:ss") )})
;
Navigate(CheckedInScrn,ScreenTransition.Fade)This will send the data to 2 SQL Tables, and go to CheckedInScrn.
The code I tried was:
If(IsEmpty(LookUp('[dbo].[Visitor_Register]',Phone=NVS_Phone_Input_Text.Text)), Patch('[dbo].[Visitor_Register]',Defaults('[dbo].[Visitor_Register]'),{FullName: NVS_Name_Input_Text.Text,Company: NVS_Company_Input_Text.Text,Phone: NVS_Phone_Input_Text.Text, Email: NVS_Email_Input_Text.Text, VisitorType: "V", WHS: "NA"})
;
Patch('[dbo].[Visitor_Records]',Defaults('[dbo].[Visitor_Records]'),{FullName: NVS_Name_Input_Text.Text,Company: NVS_Company_Input_Text.Text,Phone: NVS_Phone_Input_Text.Text, Email: NVS_Email_Input_Text.Text, CheckIn:
DateTimeValue( Text( Value( Now() ), "[$-en-US]mm/dd/yyyy hh:mm:ss") )})
;
Navigate(CheckedInScrn,ScreenTransition.Fade),Navigate(ReturnGuestScrn,ScreenTransition.Fade);Notify("You appear to already be registered",NotificationType.Warning))But it gives me the message saying I am already registered, even though the Phone number does not exist in SQL and is a nvarchar data type
I am guessing I am missing something small somewhere, but not quite sure.
Thank you in advance for your help.