Jump to content

Recommended Posts

I am not sure why you would essentially want to create a 'table' in a database from a script.  I believe that most people would create the table then populate from a script.  Perhaps if you explained what you are trying to accomplish so that we could have a better understanding we may have some insight on a solution.

Edited by tvarvais
Link to post
Share on other sites

@Todarivah Yes, it is. EDFs are defined in the extrafield table. You'd use an insert statement to create the new EDF -- but to use it you'd need to get the newly generated ID column value, which is an autoincrement column in the database. Once you have the ID you can use an insert statement into the extrafielddata table to set that new EDF to a value for the particular entity you created it on.

Generally it's not a common use case to programatically generate EDFs in the long term. If you're looking to do some initial setup there's no issue, but as others have mentioned there are other ways of referencing a custom value per device that scale better.

Edited by Automation Theory
Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...