API to lookup Private Data

Post Reply
Erazor
Newbie
Posts: 17
Joined: Thu Aug 29, 2013 10:15 am

API to lookup Private Data

Post by Erazor »

Hi all,

I have a file name: 123564_Client_StyleStrong_Mousse_200ml_3DASL_R8514.ai
With the app String Splitter I generate PrivateData from the filename.
If you look at the PrivateData after String Splitter you will see in Split.Part7, that is segment 7 of the filename, you will get a result R8514 as PrivateData.
What I do next or want to do is use an API call: curl -X GET -H "Authorization: Bearer xxxxxxx" https://api.smartsheet.com/2.0/sheets/123445646
This call gives met the following results:
Materialcode Material Name
R6000 Tecco Paper
R7001 White Label Glossy
R7002 White Label Semi Matt
R8415 Cartonboard
R8502 Clear Poly Film
R8505 White Lique Film
R8506 Invisible Label Film
R8508 Metallized Poly Film
R8509 White Metallized Poly Film
R8512 Metallized Label Film
R8514 White Shrink Film
R8515 White LDPE Film
R8517 Clear Shrink Film
In Materialcode, I want to use search for the value in Split.Part7, so meaning R8514.
The result will be "White Shrink Film".
What needs to happen is the result in column “Materialcode” should be combined with Material Name to give you the end result: “R8514 White Shrink Film”.
The end result, “R8514 White Shrink Film”, should then be added to an XMP field in the file with XMP Inject.

All help will be greatly appreciated.
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: API to lookup Private Data

Post by magnussandstrom »

Hi Erazor, do you really need to use API for the lookup?

If not, I would suggest to use the free Row2Variables app and use a simple Excel-file for the mapping. It's easy to setup. If the file name always ends with _"Materialcode" you don't need to use string splitter, just use [Job.NameProper:After="_"] as the Lookup Value in Row2Variables. You will now have the Material Code as PrivateData and can use it for XMP Inject.
Erazor
Newbie
Posts: 17
Joined: Thu Aug 29, 2013 10:15 am

Re: API to lookup Private Data

Post by Erazor »

magnussandstrom wrote: Mon May 09, 2022 12:33 pm Hi Erazor, do you really need to use API for the lookup?

If not, I would suggest to use the free Row2Variables app and use a simple Excel-file for the mapping. It's easy to setup. If the file name always ends with _"Materialcode" you don't need to use string splitter, just use [Job.NameProper:After="_"] as the Lookup Value in Row2Variables. You will now have the Material Code as PrivateData and can use it for XMP Inject.
Thank you very much working perfectly!
Post Reply