Insertion of variable in conditional expression

Writing a book, Automating Document Production - Discuss your special needs here

Insertion of variable in conditional expression

Postby mountain73 » Mon Sep 14, 2015 11:25 am

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
mountain73
 
Posts: 2
Joined: Mon Sep 14, 2015 11:11 am

Re: Insertion of variable in conditional expression

Postby jrkrideau » Mon Sep 14, 2015 2:12 pm

OpenOffice 4.1.6; Ubuntu 18.04
jrkrideau
Volunteer
 
Posts: 3690
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Insertion of variable in conditional expression

Postby RoryOF » Mon Sep 14, 2015 2:25 pm

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29102
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insertion of variable in conditional expression

Postby mountain73 » Tue Sep 15, 2015 9:08 am

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
mountain73
 
Posts: 2
Joined: Mon Sep 14, 2015 11:11 am

Re: Insertion of variable in conditional expression

Postby RoryOF » Tue Sep 15, 2015 9:20 am

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.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29102
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insertion of variable in conditional expression

Postby acknak » Tue Sep 15, 2015 1:45 pm

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
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Advanced Uses

Who is online

Users browsing this forum: Google [Bot] and 1 guest