Check if specific record exists action uses Database API to check if a Specific Value exists in the table.
Insert your code into the conditional statement instead of the comments to determine what happens if the Specific Value already exists or if it doesn't.
This action is available at any event except JavaScript onload events.
'********** Check if specific record exists (VB) ************
Dim rs,data
rs = DB.Query("select * from AnyTable where SomeColumn='Specific Value'")
data = rs.fetchAssoc()
If XVar.Pack(data) Then
' if record exists do something
Else
' if dont exist do something else
End If
//********** Check if specific record exists(C#) ************
dynamic rs = DB.Query("select * from AnyTable where SomeColumn='Specific Value'");
dynamic data = rs.fetchAssoc();
if(data)
{
// if record exists do something
}
else
{
// if dont exist do something else
}
See also:
•JavaScript API: getSelectedRecords()
•JavaScript API:getSelectedRecordKeys()
•Update multiple records on the List page