Automation - with Replace API
Hi, one of the file I want to automat have a bunch of spaces, I am trying to replace space like this: replace " ", with "", but at no vail. I would need example of how to replace spaces using the v3 API ( "replace": object: {key=field to apply function to: {key=value to search for: value to replace with}}. )
"field_format":{
"upc":{
"combine":{
"fields":[
"UPC",
""
],
"delimiter":""
},
"replace":{
" ": ""
}
}
},
Hey Erno,
For the "replace" function -- that would go underneath "vendor_actions", so you can use it as follows for example:
"vendor_actions": [
{
"replace": {
"upc": {
" ": ""
}
}
}
]
Let us know if that works or if you have any further issues!
OK, I TREID IT LIKE THIS:
AS KEY I TYPED " " ( SPACE BETWEEN DOUBLE QUOTES), AND GOT "" "". IS THIS WHAT YOU MENT?
Also, I am doing this replace to upc, but my data file has UPC, basically the UPC has the spaces ( sevral spaces before and after)
I think the replace worked, but I had to copy /paste all of the file_configs from a TXT file, so the " " ( quote space quote ) would kick in ( on google chrome).
looking at the source , I can see an extra space and I tested, and the automation runs without errors:)