Metadata field dependency

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 336
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Metadata field dependency

Post by Terkelsen »

Is there any way to make a metadata field in a Submit Point dependent on the choice in a parent field, if the value in the parent field is retrieved from a database?

I have a database containing all available medias in seperate rows. For each media there are different sizes (roll widths). When a specific media is chosen from a dropdown retrieved from the database, I need a child-field where you can choose between different sizes depending on the media chosen in the parent field.

It can be achieved by making static multiline dropdown-lists with the available medias and then make several child-fields with different media sizes and only make them visible depending on the chosen value in the parent field. That, however, requires a lot of manual maintenance of all these fields. That's why I would rather just maintain the database, but I doubt this is possible :?
rhd_ole
Member
Posts: 149
Joined: Mon Jan 24, 2022 5:36 pm

Re: Metadata field dependency

Post by rhd_ole »

Terkelsen wrote: Mon Jan 06, 2025 4:50 pm Is there any way to make a metadata field in a Submit Point dependent on the choice in a parent field, if the value in the parent field is retrieved from a database?

I have a database containing all available medias in seperate rows. For each media there are different sizes (roll widths). When a specific media is chosen from a dropdown retrieved from the database, I need a child-field where you can choose between different sizes depending on the media chosen in the parent field.

It can be achieved by making static multiline dropdown-lists with the available medias and then make several child-fields with different media sizes and only make them visible depending on the chosen value in the parent field. That, however, requires a lot of manual maintenance of all these fields. That's why I would rather just maintain the database, but I doubt this is possible :?
So you can not query a query (Parent-Child) in a submit point.

Using scripting in the submit/checkpoints we query our database for active job numbers, which is straightforward. However, I also handle something similar to what you're aiming to achieve. Since Switch can only query as the submit form is loaded, I managed this by using the parent to control the process. I then implemented a script to query each group within the parent. In my case, I select either "Sheet" or "Roll," and each selection triggers the query results displayed as a dropdown and the user can select what they want. I also have this to add or move stocks so the list is auto-maintained outside of the parent categories that are manually made it the submit point

Here is screenshot, There are some roll stocks in there but that's because those are mounted vinyl so they are used as a sheet.
Screenshot 2025-01-06 at 10.23.54 AM copy.jpg
Screenshot 2025-01-06 at 10.23.54 AM copy.jpg (126.87 KiB) Viewed 13826 times
Color Science & Workflow Automation
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Metadata field dependency

Post by jan_suhr »

One way around that is a web portal that do the query and forms and sending a webhook to Switch.

Then it will be another window than the Switch Portal.

I have done these kind of web portals that in some cases uses the Switch submit point as the field creator for the web portals form but you can also do your own from in the web portal.

This way is more flexible and the webhook can send an XML of JSON to Switch with all info needed. It can also be used for file uploading of course.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
Terkelsen
Advanced member
Posts: 336
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Metadata field dependency

Post by Terkelsen »

@rhd-ole, so if I understand you correct the values in the parent field are predefined in the Submit Point and you then query the database for the values in the child-field based on the choice made in the parent field? That's interesting :idea:

Would you be willing to share the script that you are using?
rhd_ole
Member
Posts: 149
Joined: Mon Jan 24, 2022 5:36 pm

Re: Metadata field dependency

Post by rhd_ole »

Terkelsen wrote: Tue Jan 07, 2025 9:03 am @rhd-ole, so if I understand you correct the values in the parent field are predefined in the Submit Point and you then query the database for the values in the child-field based on the choice made in the parent field? That's interesting :idea:

Would you be willing to share the script that you are using?
Yes, that exactly correct. I have a script that queries each parent value in our DB (predefined values, and in my case never changed) so when ever the Parent value is selected it loads the query results as a list in the child-field.

I also do something similar for exact reprint jobs where the art is always the same. I wrote a script that reads the contents of a folder and displays as a drop down in the submit point. Using this method allows the submit point to be auto-managed, when new art is added to the repository of files, it'a automatically added to the list in the dropdown.

I'm PM you these scripts, The stock and job number ones are specific to our MIS though but should give you an idea, the other used for reprints. just relies on a defined path.
Color Science & Workflow Automation
User avatar
tdeschampsBluewest
Member
Posts: 127
Joined: Tue Jun 01, 2021 11:57 am

Re: Metadata field dependency

Post by tdeschampsBluewest »

One way of doing this, is to create as many new line as needed with the same tag name, depending on the previous node choice.
It's a bit tedious, and not suited if you have long dependency chain, or a lot of choice/dynamic choice in a top node.


I know that it's too late for 2024 Christmas, but maybe for a 2025 release?
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Post Reply