Grooper 21.00.0082 is available as of 12-12-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.1.0016 is available as of 03-15-2024! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.

Get the File Name

kylesouzakylesouza Posts: 156 ✭✭✭
I am trying to get the PDF file name (2006-71213;829.894.pdf) as a value of a Data Field in my model.  I have tried putting the Data Field on my Doc Type level and on the level above and have it inherited by the Doc Type specific Data Model.  For context:


I can see the file name in the GUI.  It  is the value of the File Name attribute of the lease's parent folder:


I have tried a few variations of the expressions found on the Wiki at https://wiki.grooper.com/index.php?title=Expressions_Cookbook#Default_Value_Expressions, all to no avail.  I know I have removed the file link, and that may make this more difficult, but I can't help but feel that it is still possible to accomplish.
SIDE NOTE: It would be cool to have a "Validate Expression" button on the Default Value Expression window so that the expression could be validated before closing that window.
Kyle Souza
Data Wizard
P&P Oil & Gas Solutions

Best Answer

  • kylesouzakylesouza Posts: 156 ✭✭✭
    edited October 2020 Answer ✓
    FIGURED IT OUT:
    IO.Path.GetFileNameWithoutExtension(ParentFolder.AttachmentFileName)

    Alternatively:
    IO.Path.GetFileName(ParentFolder.AttachmentFileName)
    Kyle Souza
    Data Wizard
    P&P Oil & Gas Solutions
Sign In or Register to comment.