Metadata - Paired Dropdown lists

Post Reply
MBloomer
Newbie
Posts: 4
Joined: Fri Oct 02, 2020 6:07 pm

Metadata - Paired Dropdown lists

Post by MBloomer » Mon Oct 05, 2020 9:41 pm

New to Switch, but I was wondering if it is possible to provide a paired dropdown list for the metadata entry?

Something like the user selects their department, say Finance, but there is a related abbreviation for the department - "FIN"

So the dropdown would look something like:

Finance FIN
Customer Service CSR
Operations OPS
Marketing MKT
. . . etc.

The first list is needed because the users do not know the abbreviations. The second portion is needed because it will be used to rename files later.

I know we can code the abbreviation on the backend, we are just wondering if there is a good way around it by just doing a paired dropdown.

Thank you in advance.

freddyp
Advanced member
Posts: 543
Joined: Thu Feb 09, 2012 3:53 pm

Re: Metadata - Paired Dropdown lists

Post by freddyp » Tue Oct 06, 2020 8:27 am

Just add the list as you have written it to the dropdown items of the metadata field. When you then access the metadata value with a single-line text with variables use the After field to specify that you want everything after the space.

MBloomer
Newbie
Posts: 4
Joined: Fri Oct 02, 2020 6:07 pm

Re: Metadata - Paired Dropdown lists

Post by MBloomer » Tue Oct 06, 2020 10:31 pm

Thank you for pointing me in the right direction.

I am trying to use the AFTER in renaming the file, but the syntax does not seem to be correct.

I am defining the name in the Rename process using the single line text with variables defined:

[Metadata.Text:Path="Client Code",Case="upper",After=" - "]_thb_[Metadata.Text:Path="MRCNum"]_[Metadata.Text:Path="Sequence",Case="upper"]

The result is "_thb__", not sure why none of the metadata variables are being added?

freddyp
Advanced member
Posts: 543
Joined: Thu Feb 09, 2012 3:53 pm

Re: Metadata - Paired Dropdown lists

Post by freddyp » Wed Oct 07, 2020 9:06 am

"Client Code" is not a valid xpath. I think you just typed the label of the field in your submit point. You should use the "Build location path" dialog to build the xpath interactively. Then you know it is right. However, the xpath that is built in this way is not particularly smart: it use indexes, but sometimes alternative methods for building the xpath are better.

Assuming this is indeed the label of the field in your submit point then the correct variable (or to be more accurate, one possible correct variant) looks like this:

Code: Select all

[Metadata.Text:Path="//field[tag='Client Code']",Case="upper",After=" - "]

MBloomer
Newbie
Posts: 4
Joined: Fri Oct 02, 2020 6:07 pm

Re: Metadata - Paired Dropdown lists

Post by MBloomer » Fri Oct 09, 2020 10:18 pm

Thanx for the help. Working perfectly now.

Post Reply