| Author |  | 
      
        | jeffw_00 Super User
 
  
 
 Joined: June 30 2007
 Online Status: Offline
 Posts: 935
 | 
          i've tried various formulas and they all syntax-error out.  I would think this would work
           | Posted: July 29 2018 at 09:15 | IP Logged |   |  
           | 
 |  
 ph_setglobal_s("NEW",ph_getglobal_s("ORIG"))
 
 but I get a syntax error.
 
 what's the right way to do it?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Jeff,
           | Posted: July 29 2018 at 16:38 | IP Logged |   |  
           | 
 |  
 That is definitely the right way to do it so not sure what would be going on. I just tested out on my system and the below worked without
 issue:
 
 ph_setglobal_s("NEW",ph_getglobal_s("ORIG"))
 
 Which looks to me to be identical to what you have. The only thing I can think of is perhaps one of the globals doesnt already exist?  Nope,
 that wouldnt be it either as I just tested one and both of the variables not existing and I don't get a syntax error.
 
 A syntax error should be just that. Mismatched parenthesis', mismatched quotes, wrong number or type of arguments, etc.  I even copy/pasted the
 formula from your post and it executed just fine for me.
 
 Can you post or email me a screenshot of the formula and the error you're getting? Also a copy of what is currently in the "ORIG" variable.
 
 Thanks,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | jeffw_00 Super User
 
  
 
 Joined: June 30 2007
 Online Status: Offline
 Posts: 935
 | 
          Sorry - I had a typo in the post.  In my code the first was a ph_setglobal_a - which i guess is wrong, though I'm surprised it generates a syntax error.  Using setglobal_s (like in my post) works fine.
           | Posted: July 29 2018 at 18:48 | IP Logged |   |  
           | 
 |  
 Thanks!
 /j
 | 
       
        | Back to Top |     | 
       
       
        |  |