reger
Returning Observer

Check usage of input fields

Jump to solution

Hi,

is it possible to check the general usage of an input field in a named section template? For explanation: 
In some section templates you find input fields and perhaps you wonder whether they are used at all.  No complete or actual documentation and for clean-up you might want to delete the field. But you don't know if there might still be content somewhere that is needed. 
Desireable would be a search where I can specify the field (-name like st_headline, st_picture....) and the section template and the reults show me all content pages where the section template is used and field is not empty or with a special value.

Any ideas?
Regards
Gabriele Reger

0 Kudos
1 Solution

Accepted Solutions
mbergmann
Crownpeak employee

Hi Gabriele,

you can use something like

st_helperclass=* and fs.templateId=123456

... where 123546 is the numerical (!) id of the template. Not sure why that's not documented... You get the ID via the template's properties: Right click on the template => properties => technical => ID

Be aware that the numerical id will differ between projects for the "same" template - even if that template has been transported there via ContentTransport or other mechanisms! 

One hint: The search only covers the "current state" - so theoretically it's possible that the search returns nothing, but there may still be objects in the release state that still contain data. This can happen if an element with data was released and then the field was emptied or the element was deleted - without releasing the change/deletion.

Hope this helps.

Michael

 

View solution in original post

3 Replies
reger
Returning Observer

Okay,  in the meantime I did some more research and found out that there might be a solution with QueryAgent. Simply specify e.g. "st_helperclass='' and fs.store=pagestore" and you get all results where the input field is empty and matches are limited on pages. Fine.
But I want to get the opposite results, where the field is not empty. If I try "st_helperclass <> ''" or "st_helperclass != ''" I get no logical matches. Definitely the syntax is wrong, but how can I detect a none-empty field in the query? And finally if my results only show hits from pagestore, how can I lrestrict the hits to a specific section template.? 

0 Kudos
reger
Returning Observer

And another insight: To find not empty fields the query with wildcard works, eg. st_helperclass=*
That means my last and only remaining problem is to reduce the search for specified section templates....

0 Kudos
mbergmann
Crownpeak employee

Hi Gabriele,

you can use something like

st_helperclass=* and fs.templateId=123456

... where 123546 is the numerical (!) id of the template. Not sure why that's not documented... You get the ID via the template's properties: Right click on the template => properties => technical => ID

Be aware that the numerical id will differ between projects for the "same" template - even if that template has been transported there via ContentTransport or other mechanisms! 

One hint: The search only covers the "current state" - so theoretically it's possible that the search returns nothing, but there may still be objects in the release state that still contain data. This can happen if an element with data was released and then the field was emptied or the element was deleted - without releasing the change/deletion.

Hope this helps.

Michael