Submitted by jan_rifkinson on 2010/09/08 20:04
 Last year I started a daily log which was set up like this:
Then I CHANGED the setup to look like this
 
Although it's a bit confusing:
 
the old "Journal Date" is the first of the month 
The old item TLI = month expressed numerically
The child is the numeric date, i.e. current date
The grandchildren are the log entries
 
The new "Journal Date" is the numeric date, i.e. current date
the item TLI = day of the week
the children are now the various log entries
 
If possible I'd like to automate or semi-automate
the task of converting the old format into the new format
perhaps I should have made the day of the week it's own field vs the TLI but I didn't
I suppose I can also leave this entire mess alone
 
It all depends on what you experts tell me.  TIA

Comments

You could set a new y/n field auto-assign to A:JournalDate=Item|A:Item=WeekDayName(WeekDay(JournalDate))
 
Then check this y/n field for each of your dated entries.
 
Last step, is to delete the parent item (02-09). You can select multiple ones >> Erase items. When prompted to delete subs, answer NO.
 
(do this on a backup first, to make sure it works the way you want.)
 
*** don't forget to delete this field when done, as it can do nasty things to other items ***
 
 
HTH

jan_rifkinson

2010/09/09 16:29

In reply to by Pierre_Admin

Pierre. Thank you for helping me with this.
 
The first steps you created worked fine
but
the last step unfortunately erased the sub-items even though I selected "no". You might want to check this out @ your end because if it turns out to be a bug, it could become pretty serious for someone.
 
Right now I'm digging through my Journal to reconstruct all the erased items
 
2010/09/09 16:28: actually it may have been working but because of a filter, it disappeared from the grid as I am finding blank items & all the dated entries by scrolling through my journal.

Armando

2010/09/09 21:51

In reply to by jan_rifkinson

Yes, by erasing the parents, if only the parents met the source, sub items would've disappeared from the grid. Hopefully it's not too long to put them back where they should be...

jan_rifkinson

2010/09/10 08:09

In reply to by Armando

Armando, I don't believe (but can't be 100% sure) -- I think filter was set elsewhere, i.e. was not directly related to TLI. Too late for me to reconstruct now.
But If the item disappeared, is this related to Pierre's note @ www.sqlnotes.net/drupal5/index.php

jan_rifkinson

2010/09/09 17:14

In reply to by Pierre_Admin

In that equation, how would user differentiate between format for a 3 day of the week vs full day of the week as in
Wed vs Wednesday.
In the VBScript link you supplied the language looked the same to me except for "True"
and I don't understand that at all. What is true?

Armando

2010/09/09 21:59

In reply to by jan_rifkinson

[quote=jan_rifkinson]
In that equation, how would user differentiate between format for a 3 day of the week vs full day of the week as in
Wed vs Wednesday.
In the VBScript link you supplied the language looked the same to me except for "True"
and I don't understand that at all. What is true?
[/quote]
 
"True" is just a value for a Boolean parameter in the function you're using. It basically ways "Yes, abbreviate the day". Do instead of having what Pierre suggested it would be :
 
A:JournalDate=Item|A:Item=WeekDayName(WeekDay(JournalDate, true))
 
 
Like Pierre said though, always best to try in a backup or something like that to prevent damage...

jan_rifkinson

2010/09/10 08:34

In reply to by Armando

So now if I really want to be anal retentive about my Journal & make everything the same
I want to change
Item = Friday
to
Item = Fri
 
So I need another equation for a new boolean field.
Is the following even close?
 
A:WeekDayName=item|A:item=WeekDayName(WeekDay, true))
 
 

Pierre_Admin

2010/09/10 09:30

In reply to by jan_rifkinson

There is a much simpler way...
  1. In your Journal grid, turn on the Alpha filter: Item = Friday
  2. Remove the date filter
  3. Your grid should now all show Friday items
  4. Select all items
  5. In the Properties pane, change the value for the item field to: Fri
  6. Repeat for the 6 other days of the week
  7. You probably want to turn on your date filter and turn off the alpha filter

Armando

2010/09/10 12:14

In reply to by Pierre_Admin

[quote=Pierre_Admin]
There is a much simpler way...
  1. In your Journal grid, turn on the Alpha filter: Item = Friday
  2. Remove the date filter
  3. Your grid should now all show Friday items
  4. Select all items
  5. In the Properties pane, change the value for the item field to: Fri
  6. Repeat for the 6 other days of the week
  7. You probably want to turn on your date filter and turn off the alpha filter
[/quote]
 
Yes, this is how I do most "big scale" changes.