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.
I think your request to alter the samples logbook will be called with "execute new" or similar at submit time of the entry to the measurement logbook.
Then both methods will have the issue that elogd is still processing the submit and can't answer new requests until the old is finished.
Have a look at https://elog.psi.ch/elogs/Forum/69328 for possible workarounds.
Best wishes,
Sebastian
Stefan Ritt wrote: |
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
Then you can parese this CSV file and extract the entry ID, which you can pass to the elog client to submit a new entry to the other logbook.
Stefan
Chris Körner wrote: |
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 the corresponding entry in the 1st logbook. For example I want to append a line in the free text field to have a full log of what happened to a sample there. We reference our samples with a unique auto-generated ID in both logbooks. Is is somehow possible to search the 1st logbook for that ID or any other attribute and obtain the elog entry ID since the elog client will need that ID for editing an entry?
|
|
|