BizForm API - How to check if a column exists in form table

Alexander Toups asked on June 13, 2017 12:01

I want to check if a given form contains a certain column (e.g. userID). I tried:

DataClassInfo formClass = DataClassInfoProvider.GetDataClassInfo(bizFormInfo.FormClassID); formClass.ContainsColumn("userID");

But it always returns false. Any idea?

Recent Answers


Brenden Kehren answered on June 13, 2017 13:24 (last edited on June 13, 2017 13:25)

Try something like this directly in the Bizform: (assuming you're using the biz form)

FormInfo fi = viewBiz.FormInformation;

if (fi != null)
{
    if (fi.FieldExists("YourFieldName"))
    {
        // field exists so do something
    }
}
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.