A kind of control for Design & Print with dynamic templates

Started by sinus, April 19, 2023, 04:35:05 PM

Previous topic - Next topic

sinus

If you work with "Design & Print" and dynamic templates, you do maybe work with several categories or even folders.
I work with categories, means, I select 1 or several categories and drag'n'drop all images into D&P.

For most users, this is not interesting, but who knows. 
In my case, it is important, that I do select the correct categories. 
And because I have inside the D&P-template a kind of index with the amount of images, it is also important, that the amount of images is correct (in case I have added/delete some).

Because for the amount of images in categories, I have written the amount of the total in different metadata-fields. I do this only into the first image of a category. 

Now these information about the amount of images in sub-cats will be transferred with the first image into D&P.
This allows me, to work in D&P with these infos.

I can count the sum of all images total (there is also a variable for this), and I can now count each total of each sub-cat (where we have no variable).

With this information, all take from the first image (in the metadata-fields), I can create an index and I can do a kind of control.

For this I have created a text-field in D&P and added some text like "Attention! Wrong number of images".
Then I go into the hidden-field of this textfield and add a variable like this:

{Group:first.File.MD.PLUS::XMP\RegionConstraints\RegionConstraints\0|math:add,{Group:first.File.MD.PLUS::XMP\LicensorLicensorURL\LicensorURL\0|math:add,{Group:first.File.MD.PLUS::XMP\MediaConstraints\MediaConstraints\0|math:add,}}}};numcomp:eq,{Print.Document.Files.Unique|pereplace:.==},1,0}

(I have shortened this variable, hence MAYBE there where 4 } are, you must maybe delete one or two or add one or two.)

This variable counts the metadata-fields of the first image and does an addition of all. 
In the case here I have added only 3 categoriey to show it, usually I have 5, 10 or 20 categories. 
Then the variable compares this number with the total of files.

If the numbers are equal, all is correct and the textfile is hidden.
If the numbers are not equal, the textfile (with big letters in red) will be displayed.

I do work now with this since, hmm, maybe two years, and it works great. I have written this here only, because this system has just now saved me for unnecessary work, because I have selected only 17 categories instead of 15 and the big red words has been displayed.

Means this is a kind of "control mechanism", what most of the users will never need, but it shows, that we can do a lot with D&P and variables and, btw, also in IMatch itself, with variables. 
For example to control, if all fields in the metadata is filled out and so on.

It is not easy to explain, but maybe my attachement helps a bit.
1) categories, what I drag'n'drop into D&P
2) correct amount of images
3) incorrect amount




Best wishes from Switzerland! :-)
Markus