CoreBOSBB

Full Version: [SOLVED] How to change exported odt filename with Gendoc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,
I was looking in modules/evvtgendoc files to find where I could change the file name when export in odt but no luck.
Now, when I export in odt, in Ticket module, I obtain : "ModuleName"_"Ticket_Title".odt and I would like :  

"ModuleName"_"Ticket_Title"_"Ticket_number".odt

Could you help me doing that ?
Thanks.
There is a global variables for that: GenDoc_Attachment_Name

have you tried that one?
(07-03-2023, 06:51 AM)joebordes Wrote: [ -> ]There is a global variables for that: GenDoc_Attachment_Name

have you tried that one?

I only see these Gendoc vars :

GenDoc_Convert_URL
GenDoc_CopyLabelToClipboard
GenDoc_Default_Compile_Language
GenDoc_PDFConversion_Retries
GenDoc_Save_Document_Folder

I need to update
can you update?
I found this GV but I don't know how to add "ticket_number" in the filename with this GV :

Workflow_Email_GenDoc_Attachment_Name String Name|Number When merging a GenDoc workflow email attachment, the name used for the attachment will be the Entity Name field (Name) or the Entity Number field (Number) concatenated with the template name.
(07-03-2023, 07:49 AM)geraldbigot Wrote: [ -> ]I found this GV but I don't know how to add "ticket_number" in the filename with this GV :

Workflow_Email_GenDoc_Attachment_Name String Name|Number When merging a GenDoc workflow email attachment, the name used for the attachment will be the Entity Name field (Name) or the Entity Number field (Number) concatenated with the template name.

Hello,

In order to get this filename ("ModuleName"_"Ticket_Title"_"Ticket_number".odt), which is a "concat" expression, means you have to:

1. Create a Business Map, type: Condition Expression where you form the expression you need.
2.  Set value of the GV (Workflow_Email_GenDoc_Attachment_Name) to Expression.
3. Relate the Business Map you created with the Workflow_Email_GenDoc_Attachment_Name GV .

Hope it helps, let us know.

Thank you,
Xhilda
Hello Xhilda,

Could you give me more details from your last explanation ?

I mean : which field ? Which exact value ? And the relation to establish between GV and WF ?

Thank you
Gérald
Hi

It isn't exactly the same but the next three images show how to change the name of the download PDF in Quotes, the workflow GV is almost identical. HTH
Hi,

I tried your example but export gives me such file : "pdf.pdf" instead of 45650_CLIENT.pdf
Just to be sure of the syntax, is the content :

<map><expression><![CDATA[stringreplace('__',",stringreplace('','_',stringreplace('&','and',concat(quote_no,'_',account_id)) ))]]></expression></map>

Gérald
ok. the expression above is for QUOTES, it won't work anywhere else, and it is doing a bunch of transformations you may not need

it was just an example of one that is working

the one I shared does this:

- concatenates the quote_no with an underscore and the account_id (both fields only available in a quote
- replaces all ampersand for the string 'and'
- replaces all spaces with an underscore
- deletes all double underscores

you have to create your own for your own purpose
Pages: 1 2