Group by year month and date of registers...

67 views
Skip to first unread message

Sergio Trujillo

unread,
Apr 22, 2021, 2:30:42 AM4/22/21
to mementodatabase
I am using Android app of memento database. I want to view my diary in a tree form, with year in first level, month in second and date in third level. All collapsable. In day level I have some rows with differnt hours. Ordered by time asc. For example:

2021
4
12-04-2021
Hour1
Hour2
...
3
10-03-2021
Hour1
Hour1
...

I have created two hidden fields, year and month, with calculate type, for the group of library. But i dont know how to extract year and month of date for that calculated field.

Sergio Trujillo

unread,
Apr 22, 2021, 3:46:46 AM4/22/21
to mementodatabase
Respond myself:

With a Script Field with moment.min.js library import.

Year: moment.(field("Date")).format("Y")
Month: moment.(field("Date")).format("M")

Group: Year, Month and Date.
Sorting: Year (Des), Month (Des), Date (Des) and Time(Asc)

Bill Crews

unread,
Apr 22, 2021, 4:34:21 AM4/22/21
to Sergio Trujillo, mementodatabase
To clarify, that would be a JavaScript field, and besides the script, you'll need to check the box below the editor (assuming mobile Memento) to include the moment.min.js library.

--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/3c57af78-46b6-4d2d-9f95-542e5b99e64bn%40googlegroups.com.

Er Mo

unread,
Apr 22, 2021, 1:27:07 PM4/22/21
to mementodatabase
Hallo Sergio Trujillo
Ich würde das Ganze nicht Gruppieren , sondern eine Teil Sortiren . Filter anlegen mit " Jahren " , Registerkarten mit den Monaten und zum schluss die Tage Gruppieren .

Hello Sergio Trujillo
I would not group the whole thing, but sort a part. Create filters with "years", tabs with the months and finally group the days.

Bill Crews

unread,
Apr 22, 2021, 3:51:36 PM4/22/21
to Sergio Trujillo, mementodatabase
I ain't you're familiar with field dependencies in Edit Library. In case you're not, you can see here ...


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.

Bill Crews

unread,
Apr 22, 2021, 3:53:49 PM4/22/21
to Sergio Trujillo, mementodatabase
The word "ain't" isn't mine. Swype keyboard did that because I was too sloppy. It was to have been "assume".

Sergio Trujillo

unread,
Apr 29, 2021, 2:14:07 PM4/29/21
to mementodatabase
There is a bug with the grouping with Hidden fields.
For example, I create the calculated Field "Year" and "Month" that fill data from "Date" field with moment javascript library.
When I group by Year and Month, and then I set both fields to Hidden, I cant select again the fields in the Groupping menu.
Reply all
Reply to author
Forward
0 new messages