INTERACT FORUM

Please login or register.

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

Author Topic: MCWS/MCC : UpdateField?  (Read 1567 times)

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
MCWS/MCC : UpdateField?
« on: November 23, 2023, 02:13:27 pm »

We have "CreateField" (with Expression) , eg :  "/MCWS/v1/Library/CreateField?Name=JRVR_Profile_To_Use&Expression=1" which is nice and fast!

But could there be a corresponding either an:
- "UpdateField" that we can update the expression? eg,  "/MCWS/v1/Library/UpdateField?Name=JRVR_Profile_To_Use&Expression=2", or
- Change the behavior of "CreateField" so that it does an update instead of currently fails (as the field already exists)


Note: I'm looking to bulk update the value of a Field across all files with a value ("1", "2" etc) using MCWS/MCC.  It needs to be fast and efficient.  I could write a loop with SetInfo but that will take (comparatively) forever. 
Logged
JRiver CEO Elect

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4225
Re: MCWS/MCC : UpdateField?
« Reply #1 on: November 23, 2023, 03:18:46 pm »

not sure how that's an expression or is it just a hack for initialising the field on create to a provided value?

your UpdateField requests sounds a bit like an MCWS version of https://wiki.jriver.com/index.php/Find_and_Replace to me
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: MCWS/MCC : UpdateField?
« Reply #2 on: November 23, 2023, 03:50:05 pm »

Sure - just trying to leverage off what we have.  FWIW, that MCWS with "...Expression=1" (or 2 etc) works really well, both in quickly creating and populating the field and working with JRVR's rule matching (for subsequent playback items - not the current).  Just need to either update it, or delete and recreate it hence the MCWS requests.
Logged
JRiver CEO Elect

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2607
Re: MCWS/MCC : UpdateField?
« Reply #3 on: November 23, 2023, 04:24:38 pm »

You should edit your post to make those links invalid - people will click them and create the field on their DB :)

Quote
Note: I'm looking to bulk update the value of a Field across all files with a value ("1", "2" etc) using MCWS/MCC.  It needs to be fast and efficient.  I could write a loop with SetInfo but that will take (comparatively) forever.

I understand you want to assign a different value to this field on each file. I'm don't think this can be done with /Library/CreateField or an hypothetical /Library/UpdateField, since these functions just create/change the definition of the field itself, so it affects ALL files in the library, not just a specific one. Note that the URL doesn't specify any fileID.

I think you need to use SetField to set the value on each file (possibly overriding the default expression value, if it's an Expression field with the "allow custom data override" checked).

Quick and dirty: list your files on a Details view, select them all, then set the field value in the Tag Editor to what you need.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: MCWS/MCC : UpdateField?
« Reply #4 on: November 23, 2023, 05:40:42 pm »

Thanks - made the link invalid.

No need to pursue this as Hendrik is going to look at the bigger picture in MC32 for JRVR.
Logged
JRiver CEO Elect
Pages: [1]   Go Up