Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 204 of 808  Not logged in ELOG logo
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 16:25:36 2021 
Nope, there is no way to acces the last value of an attribute. Sorry.

Stefan




Dominic
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Wed Mar 24 17:36:15 2021 
Sorry Stefan, but it is possible as you have the scripting ability.

The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and
parses them.
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 19:30:50 2021 
Hi Stefan, hi Sebastian,

thank you for your help. Ok I see its not that simple.

Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 19:45:41 2021 
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.

Stefan




Dominic
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Thu Mar 25 07:48:24 2021 
Thank you very much.

So far I testet all functionalities and scripts to reach my goal. I will post a dummy of the solution later on for future purposes.

Best wishes 
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Thu Mar 25 12:50:08 2021 
I am glad, we could help.

I can see a caveat in the recommendation.
By having "Execute New = echo $attrib > /path/last_attrib" and "Preset attrib = $shell(cat /path/last_attrib)" as the most
    icon2.gif   Re: Pre-fill Attribute with last entry, posted by Richard Stamper on Tue Mar 30 13:43:46 2021 
Just noting that, depending on what you want to achieve, you may be able to use the threading functionality so that a "new" entry is actually
a "reply" to a previous entry.  This will allow you to populate attributes with values from that previous entry without having to rely on
storing information outside the system, with all the attendant concurrency risks already identified.
icon5.gif   Is it possible to generate a table of contents based on h1/h2/h3 HTML tags?, posted by Niklas Hoglund on Mon Jun 19 07:48:49 2017 
Is it possible to generate a table of contents based on h1/h2/h3 HTML tags?

Example:


toc()

< h1>test
< h2>test1
< h1>test2
< h2>test3
< h1>test4
ELOG V3.1.5-3fb85fa6