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.00.0044 is available as of 06-20-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.1.0024 is available as of 09-03-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Get the File Name
kylesouza
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.
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
Data Wizard
P&P Oil & Gas Solutions
Tagged:
0
Best Answer
-
kylesouza Posts: 156 ✭✭✭FIGURED IT OUT:
IO.Path.GetFileNameWithoutExtension(ParentFolder.AttachmentFileName)
Alternatively:
IO.Path.GetFileName(ParentFolder.AttachmentFileName)Kyle Souza
Data Wizard
P&P Oil & Gas Solutions0