Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 480 of 808  Not logged in ELOG logo
    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: automatically obtain entry ID from search, posted by Sebastian Schenk on Wed Mar 24 18:02:07 2021 
Hi Chris,

Additional the the HTTP request sugested by Stefan you could also use the search functionality of the elog python module.
For the HTTP request you may also need a way to provide credentials or transmit cookies, if the elog needs authentification.
    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
icon1.gif   How to make personal ELOG to public, posted by Hien Doan on Tue Mar 30 12:56:48 2021 
Dear experts,

I am trying to use ELOG for my projects which we want to record every daily activities.
    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.
ELOG V3.1.5-3fb85fa6