automatically obtain entry ID from search, posted by Chris Körner on Tue Mar 23 23:05:20 2021
|
Hi,
in our application I want to have, let's say in the simplest case, two logbooks. One as a database of samples we fabricated and one as a
logbook for measurements. When a measurement on a sample is done and an entry is submitted to the 2nd logbook, I want to automatically edit or reply to |
Re: automatically obtain entry ID from search, posted by Stefan Ritt on Wed Mar 24 10:01:34 2021
|
You would have to do that on the scrip level. Use "curl" to search a logbook. Like following URL would search for all entries in this forum
where you are the authoer, then return the entries in CSV format:
https://elog.psi.ch/elogs/Forum/?mode=CSV1&Author=k%F6rner |
Pre-fill , posted by Dominic Schneider on Wed Mar 24 16:11:04 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook. |
Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 16:20:37 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook. |
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 |
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. |
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. |
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 |