You are viewing limited content. For full access, please sign in.

Question

Question

Change Template via SQL

asked on December 30, 2016

I would like to change the Template assigned to another Template. Ideally I would like to do this via SQL as we may have a large number of documents and I can do it on a volume by volume basis quite easily.

 

Within the TOC table there is a Pset_id which seems relates to the Propset table which appears to list templates. However during testing changes to the Pset_id within the TOC table only changes the template name assigned to the document and not the actual template used.

 

Any ideas?

0 0

Answer

SELECTED ANSWER
replied on December 30, 2016

toc.pset_id is the template assigned to the entry, the actual field data is stored in the propval table. Assign the template on a test document and do select * from propval where tocid=<entry id> to see how to set the values directly.

The standard disclaimer applies: back up your database before modifying it, and we do not recommend modifying sql directly. The SDK is the preferred way to do this. Also, the LF server caches information about entries in memory, so the LFS service should be restarted after making the change.

0 0
replied on January 3, 2017

Thanks, I believe it was the caching that was the issue here.

Many thanks Robert.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.