Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 11 of 805  Not logged in ELOG logo
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type?, posted by Dennis Seitz on Thu May 15 01:06:21 2008 

Dennis Seitz wrote:
I posted this on the end of an earlier thread but I thought it might be better to repost as a separate thread:


Thank you for pointing out the method to identify an attribute as a datetime type so that it will sort properly. I now have created my "Last Edit" attribute in several
preexisting logbooks.

I want to use
Start page = ?rsort=Last Edit
to set the default sorting of each logbook to be by Last Edit.

However, all of the entries made before I added Last Edit have no value for that field, so they are all grouped together at the end of the sort. So I
decided to go through the older entries and set Last Edit equal to the original entry date, as a starting value.

I tried to use the command
Subst on edit Last Edit = $entry time
but it gives a "-" for the Last Edit value when I edit an entry.

I think this is because $entry time is not a variable supported by Subst. Can you add that support, or else tell me if you know a better way to go about
doing what I'm attempting? Is there perhaps a way to globally process a group of entries in a logbook and set one attribute's value to be equal to
another's? To reiterate, I want to initialize Last Edit = $entrytime for all entries that have not been re-edited.

Thanks


OK, now I realize how stupid I sound here. To partially answer my own question: $entry time is a string and Last Edit is now a number since I have changed it to the datetime type so that it will sort properly.

So I can't make Last Edit = $entry time. Is there some way I can access the entry time in datetime format so that I can set Last Edit equal to that?

Sorry if I'm missing something obvious, I'm confused...
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type?, posted by Stefan Ritt on Mon Jun 2 12:01:47 2008 

Dennis Seitz wrote:
OK, now I realize how stupid I sound here. To partially answer my own question: $entry time is a string and Last Edit is now a number since I have changed it to the datetime type so that it will sort properly.

So I can't make Last Edit = $entry time. Is there some way I can access the entry time in datetime format so that I can set Last Edit equal to that?


Ok, now I got your point. Sorry for the late reply, but I was extremely busy the last few weeks. I added the missing functionality to elog revision 2108, so the 'subst on edit Last Edit = $entry date' does now work.
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type?, posted by Dennis Seitz on Mon Jun 2 23:41:15 2008 

Stefan Ritt wrote:

Dennis Seitz wrote:
OK, now I realize how stupid I sound here. To partially answer my own question: $entry time is a string and Last Edit is now a number since I have changed it to the datetime type so that it will sort properly.

So I can't make Last Edit = $entry time. Is there some way I can access the entry time in datetime format so that I can set Last Edit equal to that?


Ok, now I got your point. Sorry for the late reply, but I was extremely busy the last few weeks. I added the missing functionality to elog revision 2108, so the 'subst on edit Last Edit = $entry date' does now work.


Thanks! Do you mean '$entry time', or did you create a new parameter? (I don't see $entry date in the elogd.cfg reference)

Anway, thank you!
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type?, posted by Stefan Ritt on Tue Jun 3 12:47:13 2008 

Dennis Seitz wrote:
Do you mean '$entry time', or did you create a new parameter? (I don't see $entry date in the elogd.cfg reference)


Yes, of course I mean '$entry time', sorry for the misspelling.
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type?, posted by Dennis Seitz on Thu Jun 5 01:38:17 2008 

Stefan Ritt wrote:

Dennis Seitz wrote:
Do you mean '$entry time', or did you create a new parameter? (I don't see $entry date in the elogd.cfg reference)


Yes, of course I mean '$entry time', sorry for the misspelling.


Well, we really appreciate the way you keep adding features and making improvements. I thought you might have slipped a new one in!
    icon5.gif   Re: Re: $entry time not readable by Subst, else not datetime type? - possible Preset bug?, posted by Dennis Seitz on Fri Nov 21 18:21:36 2008 

Dennis Seitz wrote:

Stefan Ritt wrote:

Dennis Seitz wrote:
Do you mean '$entry time', or did you create a new parameter? (I don't see $entry date in the elogd.cfg reference)


Yes, of course I mean '$entry time', sorry for the misspelling.


Well, we really appreciate the way you keep adding features and making improvements. I thought you might have slipped a new one in!



FYI, I think there's a little bug in the datetime vs $date implementation.

Here's a section of my config file implementing a "Last Edit" field:

Type Last Edit = datetime
Preset Last Edit =$date
Locked Attributes = Last Edit
Subst on edit Last Edit = $date
Start page = ?rsort=Last Edit

I expected that "Preset Last Edit =$date" would set Last Edit to the current date when I create a new entry. In fact that leaves the field empty, or at least not in datetime format.

I found that using this instead works:
Preset Last Edit =$entry time

which seems contradictory since
Subst on edit Last Edit = $date
works fine.
    icon2.gif   Re: Re: $entry time not readable by Subst, else not datetime type? - possible Preset bug?, posted by Stefan Ritt on Mon Nov 24 20:00:05 2008 Capture.jpg

Dennis Seitz wrote:
FYI, I think there's a little bug in the datetime vs $date implementation.

Here's a section of my config file implementing a "Last Edit" field:

Type Last Edit = datetime
Preset Last Edit =$date
Locked Attributes = Last Edit
Subst on edit Last Edit = $date
Start page = ?rsort=Last Edit

I expected that "Preset Last Edit =$date" would set Last Edit to the current date when I create a new entry. In fact that leaves the field empty, or at least not in datetime format.

I found that using this instead works:
Preset Last Edit =$entry time

which seems contradictory since
Subst on edit Last Edit = $date
works fine.


Do you have an old version of elog? Using the current version with a configuration file:
Attributes = Author, Type, Last Edit
Type Last Edit = datetime
Preset Last Edit =$date
Locked Attributes = Last Edit
Start page = ?rsort=Last Edit

I get the correct behavior:

icon5.gif   mysql in execute, posted by Stefan Kanitz on Fri Dec 12 08:57:41 2008 

Hello all,

 

i have a question to mysql inexecute:

This works:

Execute new = mysql -h localhost -u root -D test1 -e "insert into `test1` (author, type) values ('$Author', '$Type')"

This doesn't work:

Execute new = mysql -h localhost -u root -D test1 -e "insert into `test2` (Autor, Adressat, Teil1, Teil2, Teil3,
Teil4, Teil5, Teil6, Teil7, Teil8 )  values ('$Autor', '$Adressat' ,  '$Teil1', '$Teil2', '$Teil3', '$Teil4', '$Teil5',
'$Teil6', '$Teil7', '$Teil8' )"

 

db is okay, i have all checked this. My question is: can the execute-command take a multiline argument? Or perhaps does somebody see a mistake i have made in the execute-line?

 

Thanks!

Steve


 

ELOG V3.1.5-3fb85fa6