Page 1 of 1

Insertion of variable in conditional expression

PostPosted: Mon Sep 14, 2015 11:25 am
by mountain73
Hi.

I am designing a libreoffice write template for Openkm document mamangement tool.
I would like to hide a section depending on the value of a variable defined for openkm script to be functional (input field, name=${variable} and annotation is JOODScript), but I do not manage to do it.
When I choose Insert - Section, on condition box I do not know how to refer to the variable.
Does anyone have a clue about it?
Thanks a lot

Regards.

mountain73

Re: Insertion of variable in conditional expression

PostPosted: Mon Sep 14, 2015 2:12 pm
by jrkrideau

Re: Insertion of variable in conditional expression

PostPosted: Mon Sep 14, 2015 2:25 pm
by RoryOF
This topic
https://forum.openoffice.org/en/forum/viewtopic.php?f=44&t=4866
deals with getting an OpenOffice variable into some code. It may be of help to you.

Re: Insertion of variable in conditional expression

PostPosted: Tue Sep 15, 2015 9:08 am
by mountain73
Hi.
Thanks for the quick reply.
In fact, I already saw this link where I learnt about hidden section.
The condition I need should refer to the value of an input field.
So if you say that it is not feasable from libre office without coding, I will not be able to do it .
Regards

mountain73

Re: Insertion of variable in conditional expression

PostPosted: Tue Sep 15, 2015 9:20 am
by RoryOF
I cannot say if this is possible or not. My experience with visible/invisible fields in a document is limited to a variable value entered at the head of a document to show or conceal some headers.

A search using "openoffice enter field java" (no quotes) threw up some likely candidates, mostly on stackoverflow.com. Such threads may give you a pointer on how to approach the problem. If such threads deal with "extraction" of a field the reversal to "insertion" of a field should be simple programming .

Re: Insertion of variable in conditional expression

PostPosted: Tue Sep 15, 2015 1:45 pm
by acknak
As far as I know, there's no way (without some macro coding) to get the value from an input field in any document formula or condition.