emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: database approach: extract from headers with properties different tables.
Date: Fri, 16 Oct 2020 19:29:36 +0200	[thread overview]
Message-ID: <877drqkrjz.fsf@mat.ucm.es> (raw)


Hi 

I have the following example

* Group1
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) %17Date(Date) %7STATUS(Status){X/} 
   :ID:       Issues
   :END:

** WAIT                                                            :Annu2021:
   :PROPERTIES:
   :ID:       Issue:1
   :Date:     <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:       H1
   :EJ:       E1
   :END:

** WAIT                                                            :Annu2021:
   :PROPERTIES:
   :ID:       Issue:2
   :Date:     <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:       H2
   :EJ:       E1
   :END:


That resuls in 

#+TBLNAME: grupo1
#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format "%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date %7Status(Status){X/}"
| Group  | Sheet | Exercise | TODO | Course     | Date         | Status |
|--------+-------+----------+------+------------+--------------+--------|
| Group1 |       |          |      |            |              | [2/2]  |
|        | H1    | E1       | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]    |
|        | H2    | E1       | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]    |
#+END

* Group2
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) %17Date(Date) %7STATUS(Status){X/} 
   :ID:       Issues
   :END:

** WAIT                                                            :Annu2021:
   :PROPERTIES:
   :ID:       Issue:1
   :Date:     <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:       H1
   :EJ:       E2
   :END:

** WAIT                                                            :Annu2021:
   :PROPERTIES:
   :ID:       18c81241-5ccc-4e88-8f9e-ebe24ffbdf36
   :Date:     <2020-08-05 Wed>
   :Status:   [X]
   :IS:       H2
   :EJ:       E2
   :END:

Results in 



#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format "%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date %7Status(Status){X/}"
#+TBLNAME: grupo2
| Group  | Sheet | Exercise | TODO | Course     | Date         | Status |
|--------+-------+----------+------+------------+--------------+--------|
| Group2 |       |          |      |            |              | [2/2]  |
|        | H1    | E2       | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]    |
|        | H2    | E2       | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]    |
#+END



Question: can I somehow extract a table only for sheet1 which contains
both groups?

Like 


| Sheet | Group  | Exercise | TODO | Course     | Date             | Status |
|-------+--------+----------+------+------------+------------------+--------|
| H1    |        |          |      |            |                  |        |
|       | Group1 | E1       | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]    |
|       | Group2 | E2       | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]    |




                 reply	other threads:[~2020-10-16 17:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877drqkrjz.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).