Search found 41 matches

by Dave23
Mon Mar 21, 2022 3:18 pm
Forum: Flows
Topic: decodeURIcomponent to json
Replies: 4
Views: 2386

Re: decodeURIcomponent to json

Hi @freddyp, that is good news. Unfortunately the payload is of neither xml or json. When I copy the content in to an online JSON URL decoder it converts perfectly to a json. I'm hoping there is an easy way to do this?
by Dave23
Mon Mar 21, 2022 10:24 am
Forum: Flows
Topic: decodeURIcomponent to json
Replies: 4
Views: 2386

decodeURIcomponent to json

Hi there,
I have a payload of data that I am getting from a webhook. The data needs to be decoded and parsed as a json.
Is there currently an app or away to do this within Switch using the current elements? or would this require a script to do this?
Thanks
by Dave23
Wed Mar 10, 2021 11:19 am
Forum: Flows
Topic: Remove filename from filepath in metadata
Replies: 0
Views: 8820

Remove filename from filepath in metadata

Hi, Does anyone know if there is a way to remove the filename from the filepath? The filepath is stored as metadata like this: \\NetworkDrive\Folder1\Folder2\Folder3\Test.pdf I have tried the before tab but it does not like wildcards by the looks of it. Also to add a bit of complexity the filepath's...
by Dave23
Wed Mar 10, 2021 10:45 am
Forum: Flows
Topic: Using variables in filepath
Replies: 11
Views: 14610

Re: Using variables in filepath

Hi Terkelsen,
Did you ever manage to get anywhere with making the filepath using variables or some kind of work around?
Thanks
by Dave23
Tue Aug 06, 2019 9:45 am
Forum: Switch
Topic: Delete specific files from SFTP
Replies: 3
Views: 5479

Re: Delete specific files from SFTP

That's great cheers. Sticking with this topic. Is it possible to rename folders or change a folder structure once it has been uploaded onto the FTP server? My thinking was if I uploaded a folder containing a file eg //TEST/file1.pdf and then further down the line I could either rename that folder to...
by Dave23
Tue Jul 30, 2019 1:14 pm
Forum: Switch
Topic: Delete specific files from SFTP
Replies: 3
Views: 5479

Delete specific files from SFTP

Hi all,

I was wondering if anyone has come up with a solution to be able to delete specific files from an sftp site? It is our own internal FTP server and unfortunately the api is very limited and so does not allow us to connect via HTTP request.

Thanks
by Dave23
Thu Jun 27, 2019 1:39 pm
Forum: Flows
Topic: Flow Auto Backup
Replies: 7
Views: 19062

Re: Flow Auto Backup

Hi,

I've been trying to get this Auto Backup Flow to work however I have hit a bit of a snag. I am getting a script error on the Get Flow Function portal in the Auto Backup Program flow. Have you seen this error before?

AutoBackupProgramError.PNG
AutoBackupProgramError.PNG (31.99 KiB) Viewed 15813 times

Thanks

Dave
by Dave23
Thu Jan 31, 2019 11:57 am
Forum: LEGACY scripting
Topic: Make JSON empty values
Replies: 5
Views: 7771

Re: Make JSON empty values

Hi jan,

I've updated to version 7 in the app store, however when i refresh in switch itself the "make json" app disappears. Is this a bug, or am doing something wrong? Every other version works fine and i can versions 1-6 in switch.

Thanks
by Dave23
Tue Jan 29, 2019 3:14 pm
Forum: Flows
Topic: replace xml values with switch values
Replies: 6
Views: 10395

Re: replace xml values with switch values

Hi zoranj

I've tried it with two using the script below, but that doesn't seem to work. It only takes into account the first value change.

Do i not need to amend this part of the code as well?

Code: Select all

var newXMLcontent = oldXML.replace(oldValue1,newValue1);
by Dave23
Tue Jan 29, 2019 1:50 pm
Forum: Flows
Topic: replace xml values with switch values
Replies: 6
Views: 10395

Re: replace xml values with switch values

Hi all, How would this particular script work with multiple values? Thanks function jobArrived( s : Switch, job : Job ) { // Read properties var oldValue1 = s.getPropertyValue('oldValue1'); var newValue1 = s.getPropertyValue('newValue1'); var oldValue2 = s.getPropertyValue('oldValue2'); var newValue...
by Dave23
Wed Jan 23, 2019 10:13 pm
Forum: Applications
Topic: Uncover PDF app query
Replies: 3
Views: 6530

Uncover PDF app query

Hello, I've been looking at the "Uncover PDF" app which looks like it could be very handy for me. The problem I have is that when I split PDF's it's generally just the first two pages only as the cover and the rest of the pages as the inset as well as splitting the first and last two pages...
by Dave23
Wed Jan 23, 2019 9:41 pm
Forum: LEGACY scripting
Topic: Make JSON empty values
Replies: 5
Views: 7771

Re: Make JSON empty values

Hi jan_suhr,
Thanks for this, appreciate it. I have just pm'd you with both sample xml and json.
by Dave23
Wed Jan 23, 2019 12:35 pm
Forum: LEGACY scripting
Topic: Make JSON empty values
Replies: 5
Views: 7771

Make JSON empty values

Morning all, I'm using "Make JSON" app to generate a json which i am then using to generate an order in our production environment. I am using variables from xml for the values in the json. The problem I am having is that if one of those values is empty, the json will submit the order but ...
by Dave23
Wed Jan 23, 2019 12:35 pm
Forum: LEGACY scripting
Topic: Make JSON empty values
Replies: 0
Views: 4211

Make JSON empty values

Morning all, I'm using "Make JSON" app to generate a json which i am then using to generate an order in our production environment. I am using variables from xml for the values in the json. The problem I am having is that if one of those values is empty, the json will submit the order but ...
by Dave23
Sat Jan 19, 2019 7:09 pm
Forum: LEGACY scripting
Topic: Changing values in XML xpath
Replies: 5
Views: 8463

Re: Changing values in XML xpath

Thanks for updating the script cstevens, appreciate it. jan_suhr I had originally thought about doing it that way. I have used xslt to split other xml, the issue i found with this was merging the xml's back together as i needed 1 xml as the result. I found merging them in xslt difficult and couldn't...