I'd like to display the publish date (taken from the system, not typed) of a piece unobtrusively on a page in a RoboHelp 2019 piece as a way to better support reviewers. I didn't see a way to get any sort of date in a variable in Help though. Any ideas? Is it not possible (yet)?
Assuming RH 2019 New, you can insert fields which include a date. I haven't played with how these work though.
For my example, this would work to put the publish date and time on a page in the output. All I need is for it to be someplace unobtrusive but visible so that reviewers and users can always reference it.
It would also be good to have a set of tokens or symbols like %PubDate% or %PubTime% that could be used in variable definition value fields and then displayed as variables anywhere in the piece.
Chris Dant (@Siemens), as mentioned above, you can simply add a date and/or time where you need it. With the "Auto-update this field" option activated, RoboHelp will update the field every time you open the topic again or publish it with the current date/time.
Furthermore, if you want to publish the date/time only for review, but not in the final version, you might want to conditionalize it to include/exclude it from publishing. Eg. you could do the following:
Create an empty paragraph, type in "Publication date:" and add a date field.
In the "Author" environment, create a Condition Tag in e.g. group "Properties". Give it a meaningful name (say, "publication-date").
Assign the Condition Tag to the paragraph (just drag and drop the condition Tag from the Condition Tags panel onto the paragraph).
Source code for this should look like this as a result:
<p data-condition="Properties:publication-date">Publication date: <span data-field="date" data-format="default">2019-05-08</span></p>
Go to the "Output" Environment and create a "Condition Expression" and name it like "Publish". Now you can exclude or include it for publishing:
Save and close the Condition Expressions.
In "Output" presets, select your Output Preset (e.g. "Responsive HTML5"). Select Content. In Condition Expression select the Publish Expression.
That's it. From now on you can publish two variants: With our without a Publication date. Just change the Exclude/Include field. Or just duplicate the Output Preset and have two at hand (like "Responsive HTML5 for Review" and "Responsive HTML5 Final" with the Condition set to Publish or not.
Hope that helps,
I'm going to crawl way out on this shaky little limb and say it's basically impossible at this point. The silly variable editor appears in a pop up window and as near as I'm able to discern, it has focus and you can only type or paste into it. So I tried adding a field to a topic as Amebr has shown. And sure, it added to the topic just fine. I figured at that point it would just be a matter of copying the field and pasting into that variable dialog. Nope.
It DID seem to paste, but as near as I can tell it only pasted the value and not the actual field.
But you could add it in a master page footer, then it would be on every page.
And if the "Auto-update this field" checkbox actually works, it should theoretically update every time you generate. Or at least every time you update and save the page?
Disclaimer: Thought experiment only. No guarantee this will work.
And it is managed somehow, because when I try to type in it, I get a "It is read only content" warning message at the bottom of the window.