You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
There's lots of great html fragments that can be substituted when generating html reports. �Things like "#CREATEDATE#, "MODDATE" etc. These are for properties of EA objects.
What I want is something that will put the date the html is generated into any page - e.g. on Diagrams, Objects, etc.
It would be great if there was simply a global #TODAYDATE# or similar. �Or perhaps a guru knows how to modify the customisable Javascript that generates html, to put the date into certain places?
I've managed to put some javascript into the 'Body - Diagram' and 'Body - Object' html, but this simply gets inserted as javascript into the html, thus is evaluated every time the pages is displayed - always returning the current date.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hi Nick
Here's a better script with formatting into dd/mm/yyyy format
"<script type="text/javascript"> <!-- var generated = new Date(document.lastModified); var day = generated.getDate(); var month = generated.getMonth() + 1; var year = generated.getFullYear(); document.write("Generated on: " + day + '/' + (month <= 9 ? '0' + month : month) + '/' + year); // -->"
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Thanks Phil, confirmed - that code works perfectly!
Added it into the 'Body - Diagram' and 'Body - Object' html templates. This seems to cover pretty much all the web pages we use - certainly enough for support purposes - to know which version of a website people are using.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
I'm looking for the same functionality (insert a "generated on" date that won't be updated automatically later), but for RTF reports. �Any suggestions?
[original message]
Paulus
unread,
Mar 27, 2013, 4:43:00 PM3/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
I guess that would be the 'current date' field available from the context menu 'Insert' in the RTF template editor?
[original message]
JReed
unread,
Mar 27, 2013, 5:50:00 PM3/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
That's what I used in the report template to insert the value into the RTF report. but when the report is opened (in Word), the field gets updated automatically.
[original message]
Paulus
unread,
Mar 28, 2013, 4:29:00 AM3/28/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
I thought it didn't but you're right �:(
If you use script and the EA API to generate the RTF: i use custom data fields in the RTF template (insert->data field) and then the EA api DocumentGenerator.ReplaceField to include variable content. Works as expected.
If you use the RTF generator dialog in EA i think you need to define a project constant for the data field, but then that will have a fixed value so unless you are willing to update that every time you generate a document it won't be of much help.