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 »

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: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Metadata - Paired Dropdown lists

Post by freddyp »

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 »

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: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Metadata - Paired Dropdown lists

Post by freddyp »

"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 »

Thanx for the help. Working perfectly now.
Post Reply