How to check whether the recid of a table record is empty or not
if ( ! tablename.RecId )
{
........
}
Does this works ?
Thanks
Please Verify answers/s that helped you.
Thanks everyone. It worked !
Regards,
C4u
Hi C4u,
You should have got the answer from the forum, and you can verify the answer to close the thread.
As we know that recid is a big int type so we can simple give as
If (tableName.RecId == 0)
{
//As per your requirement if empty
}
else
{
//Recid not empty.
}
You can also simply write like,
If (!table name.RecId) for your requirement. Both the ways gives the correct answer.
Hi C4u,
If you want to evaluate if the record ID is not filled, then you can check for "tablename.RecId != 0"
Okay, then show us the output.
That didnt work as I expected, it behaved differently
This should work. Did you test it and it did not?
just want to check for it doesnt exist ?
if (tablename.RecId) // If record exist { // You might want to update } else // If it does not exist { // You might want to insert. }
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156