Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   automatically obtain entry ID from search, posted by Chris Körner on Tue Mar 23 23:05:20 2021 
    icon2.gif   Re: automatically obtain entry ID from search, posted by Stefan Ritt on Wed Mar 24 10:01:34 2021 
       icon2.gif   Re: automatically obtain entry ID from search, posted by Sebastian Schenk on Wed Mar 24 18:02:07 2021 
Message ID: 69323     Entry time: Wed Mar 24 10:01:34 2021     In reply to: 69322     Reply to this: 69329
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Question  OS: Linux  ELOG Version: 3.14 
Subject: Re: automatically obtain entry ID from search 

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?

 

ELOG V3.1.5-fe60aaf