Insertion of variable in conditional expression

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
mountain73
Posts: 2
Joined: Mon Sep 14, 2015 11:11 am

Insertion of variable in conditional expression

Post 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
openoffice v4.4 on windows 7
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Insertion of variable in conditional expression

Post by jrkrideau »

LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insertion of variable in conditional expression

Post by RoryOF »

This topic
viewtopic.php?f=44&t=4866
deals with getting an OpenOffice variable into some code. It may be of help to you.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
mountain73
Posts: 2
Joined: Mon Sep 14, 2015 11:11 am

Re: Insertion of variable in conditional expression

Post 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
openoffice v4.4 on windows 7
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insertion of variable in conditional expression

Post 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 .
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Insertion of variable in conditional expression

Post 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.
AOO4/LO5 • Linux • Fedora 23
Post Reply