INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression field evaluates incorrectly when used in a file move operation.  (Read 1143 times)

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102

I've defined an expression field which extracts nested events from the keyword tag.

The expression is defined as follows in the "manage library fiels" in options:

[.Event] = if(regex([Keywords],/#(!Events[^;]+)#/,0),replace([R1],!Events\,),)&datatype=[list]

so it's a regular expression (which I didn't come up with) which strips the text before and including "!Events\" and strips the text after and including the first semicolon after "!Events\"

This expression works when used in view schemes but it does not work when used in a file move operation:

I've set up the base path as \\server\Photos and the rule as [.Events]

The resulting "to folder" contains "!Events_" .

As an example with above base and rule. A Keyword "!Events\Test" would yield "to folder" \\Server\Photos\!Events_Test\filename

This is not correct behavior?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

Use [Keywords,0] in a Rename operation.

Search Rename in the text here:

   http://wiki.jriver.com/index.php/Expression_Language
   
Logged
The opinions I express represent my own folly.

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102

Use [Keywords,0] in a Rename operation.
...

Exactly! Thanks.
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854

The [...,0] notation still trips me up from time to time, particularly when I haven't used it for a while.
Logged
Pages: [1]   Go Up