Quote:
Originally Posted by ownedbycats
Question: Is it possible to set the default of a runtime variable to the value of a specified column of the selected book?
Code:
program:
currentchap = globals(Current_Chapter=1);
strcat('OEBPS/file', format_number(add(currentchap, 1), '04d'), '.xhtml#kobo.1.1')
For example, can I set Current_Chapter to default to the value of #chaptercount rather than 1?
|
For runtime variables, the default value is irrelevant whenever you run the chain. It will always be assigned to the value you specified at the pop up variable dialog. Even if you press OK without specifying a value, the value will be an interpreted as an empty string.
The only time the default value has any effect; is at config time to act as place holder for numerical values, to prevent template errors, as explained in the
notes section of this post.
Edit: Also the runtime variable cannot be per book, but per chain.