AnsweredAssumed Answered

Problem using Base64Decode to rename a container file

Question asked by wfgclapp on Jan 5, 2015
Latest reply on Jan 7, 2015 by pjreagan

Hello,

I am using the following calculation with SetField in a script to rename an externally stored container file (jpg image).

Base64Decode ( Base64Encode (Employee::Emp_Pic) ; Employee::Employee_ID&".jpg" )

The image is of an employee, taken in FMGo and the calculation will rename the file to be employeenumber.jpg

 

My problem arises if I am replacing a particular employee image with a new one. When this happens, the file is renamed but with the new addition of '_x' after the employee number, with x starting as 1 and incrementing with each new version of the picture I take.

Example for employee 1005:

1. Original image: my calculation renames to 1005.jpg  (no problem here)

2. First re-take: my calculation renames to 1005_1.jpg (bad)

 

Any thoughts on how to get the increment to stop? I need the filename to remain 1005.jpg, for example.

 

THanks!

Outcomes