November Happy Hour will be moved to Thursday December 5th.

SQL Query Form ID's by ID's of Form Elements?

Vote:
 

Okay here's a simple one, I have some issues after merging Optimizely / EPiServer V11 with a V12, were some form elements are acting wierd and I want to go through them manually in the cms, and I have all the form elements listed with tblContent and tblContentProperty , but I would love to have the ID's of the forms they are inserted into. Can anyone share how elements in forms are linked to their form in the SQL database?
Thanks a lot in advance.
BR

#307913
Sep 03, 2023 22:21
Vote:
 

The elements, which are content items, are references in content areas. So, you need to find all pages (and blocks, a form is usually a block.) that has a content area property (stored in the LongString column) that accept form elements, then you need to parse the values of those properties. A content area property has a list of content GUIDs. This is probably nothing you want to do directly in the database. I would recommend using the API instead. You can use IContentSoftLinkRepository to do lookups where content is being referenced.

#307950
Edited, Sep 04, 2023 9:25
Vote:
 

Thanks for the intel. 

I had all the ID's, so I used this url to find all items in forms:

mysite.com/EPiServer/CMS/#context=epi.cms.contentdata:///28275&viewsetting=viewlanguage:///en

where ID 28275 was one of those I had. If the content item is used somewhere, this page Optimizely shows that with a small top banner saying:

"Changes made here will affect at least 1 item:"

That links to the form it is inserted at, and going to the form shows a similar top banner where the same link goes to the page, where the path is shown below view and preview buttons.
Took a while to finde them all, but jobs done.

#308007
Sep 05, 2023 11:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.