Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Request: make $text available for "subst", posted by Andreas Luedeke on Mon Mar 22 14:56:12 2021 
    icon2.gif   Re: Request: make $text available for "subst", posted by Stefan Ritt on Mon Mar 22 15:10:12 2021 
       icon2.gif   Re: Request: make $text available for "subst", posted by Andreas Luedeke on Mon Mar 22 19:59:13 2021 
          icon2.gif   Re: Request: make $text available for "subst", posted by Stefan Ritt on Wed Mar 24 10:06:26 2021 
             icon3.gif   Re: Request: make $text available for "subst", posted by Andreas Luedeke on Wed Mar 24 22:09:56 2021 
                icon3.gif   Re: Request: make $text available for "subst", posted by Andreas Luedeke on Mon Jun 14 18:06:06 2021 
    icon2.gif   Re: Request: make $text available for "subst", posted by Sebastian Schenk on Tue Mar 23 13:42:27 2021 
Message ID: 69321     Entry time: Tue Mar 23 13:42:27 2021     In reply to: 69318
Icon: Reply  Author: Sebastian Schenk  Author Email: sebastian.schenk@physik.uni-halle.de 
Category: Request  OS: Linux | All  ELOG Version: V3.1.4 
Subject: Re: Request: make $text available for "subst" 

I am not Stefan, but maybe I can add to this issue.

Personally I think it is not a good way to dump all the information into the text field and try to let the server parse it.
This could be archived more simply by using e.g. the python elog scripts or using the elog command tool to directly submit well structured elog entires.

As you have mentioned you could use the "execute new|edit|delete" commands to do the things you want to do.
Let the called script fetch the elog entry and alter it in the way you like and resubmit the entry.
(You have to make sure to don't generate a endless loop and you have to proably have to use a forwarding script as the elog "execute" command waits for finished execution).
This way you don't touch the 1500 characters limit of passing $text to the execute command.

Also the point "filling an attribute X with free text" needs some kind of (extended) parsing, which isn't possible with the subst command.
In our elog we such an attribute X, which is in some conditions filled with a set of other attributes and on other conditions just a normal input field, so the user could type custom text in.

"fill an attribute automatically with the character length of the text" could be done with the above mentioned execute command or it could be done on the clientside (e.g. browser using javascript or if automatically generated by a script, then directly by the script)

I hope it helps to build our application.
Best wishes,
Sebastian

Andreas Luedeke wrote:

Hi Stefan,

I've just tried to read the $text with subst into another field and failed.
It looks like $text is only available for the execution of shell scripts in the "execute new|edit|delete = <script>" command.

Could that be added? I can think of a multitude of applications:

  • In my case I want to fill an attribute X either with free text or generated from other fields. The list view will show just X and not how it was generated.
  • I could fill an attribute automatically with the character length of the text.
  • I could parse the text in a shell script and set other attributes according to the content.

Thank you for considering it.

Cheers, Andreas

 

ELOG V3.1.5-fe60aaf