Page 1 of 1

Metadata - Paired Dropdown lists

Posted: Mon Oct 05, 2020 9:41 pm
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.

Re: Metadata - Paired Dropdown lists

Posted: Tue Oct 06, 2020 8:27 am
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.

Re: Metadata - Paired Dropdown lists

Posted: Tue Oct 06, 2020 10:31 pm
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?

Re: Metadata - Paired Dropdown lists

Posted: Wed Oct 07, 2020 9:06 am
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=" - "]

Re: Metadata - Paired Dropdown lists

Posted: Fri Oct 09, 2020 10:18 pm
by MBloomer
Thanx for the help. Working perfectly now.