Regarding the string functions

Hi, Whenever I add a file it's name is getting saved in the Name attribute with the file extension like Data.doc Now when I click on the save button I want that name should be saved by getting that extension trimmed like Data. Can anyone suggest me in achieving this
1 answers

You can update the file name of the object in your app to exclude the extension like this:


if find( $filename, '.') > -1
  substring( $filename, 0, find($filename,'.')-1 )

$filename could be a variable name or the Entity/Name attribute of your FileDoc object.  You will need to set the Name attribute of the object to the value you want it to be when downloaded.

After you download the file, you may want to change to name back to its original value.  If so, save the original value in a variable.


Hope that helps!