AnsweredAssumed Answered

Amending a complicated looking script line...

Question asked by brian.curran on Nov 9, 2012
Latest reply on Nov 12, 2012 by philmodjunk

Title

Amending a complicated looking script line...

Post

     Hi,
     I've been storing PDF files in containers using the Secure/External method and a freelance developer wrote an 'OpenDoc' script so that we could click on the thumbnail and open it in Adobe or any other viewer. The script is shown below...

     This was all working fine until I started to integrate GoZync, as this requires that files are embedded in Container fields for when databases are syncing over WiFi, preventing missing file references etc.

     So, my issue is how do I disentangle the following script lines so that the relevant document is opened from within the existing database file?

     Set Variable [$field; Value: "SiteDetails::" & Get ( ScriptParameter )]

      

     Set Variable [$path; Value: Let ( [file = GetField ( $field )];

      

      
     Case ( Abs ( Get ( SystemPlatform ) ) = 1 ; "filemac:" ; Abs ( Get ( SystemPlatform ) ) = 2 ; "filewin:" ) & Get ( TemporaryPath ) & Middle ( file ; Position ( file ; ":" ; 1 ; 1 ) + 1 ; Position ( file ; "¶" ; 1 ; 1 ) - Position ( file ; ":"  ; 1 ; 1)  )
     )
      
     The above makes absolutely zero sense to me so I have no chance in hell of being able to interpret it, the freelance developer has not been in touch for several months for personal reasons so I can't contact him for help either.
      
     Thanks
     Brian.

Outcomes