Multipal expressions in a cell

28 views
Skip to first unread message

Keswicklimey

unread,
Apr 10, 2012, 4:34:05 PM4/10/12
to GEDitCOM II Discussions
I am looking to change the layout on on of the formats.

To get information into a cell you can use the command "cell
Expression,@TAG". Is there any way to get more than on bit of
information into a cell. Basically I want to get ADDR, CITY, STAE,
CTRY into a single cell.

Any help much appreciated.

John Nairn

unread,
Apr 10, 2012, 5:10:50 PM4/10/12
to geditcom-ii...@googlegroups.com
The "Expression" cell option can only get one piece of data into a cell because it is also tracking that data. Its feature is that it will automatically update whenever that data changes.

If you want any amount of data in a single cell, you can create a static or staticfield cell (the first for single line and second for any number of lines). For example, you could have

cell staticfield
set width -1
text @ADDR&return
text @CITY&", "&@STAE&return
text @CTRY
sizetofit

Here you can format any way you want and the "sizetofit" command makes sure all rows fit in the field. Each new "text" command appends that text to the cell. As written, this cell will not change if you edit the address (etc.) in a separate editing field. If that does not matter in your new format you are done. If you need live updating too, an uncommon command can do it, which is to set "watch expression" on the cell. I added that feature for just such an application, but it turns out it is almost never needed. Here you should be able to watch all those separate expressions, such

set watch @ADDR
set watch @CITY
set watch @STAE
set watch @CTRY
set autoreload yes

and be able to get live updating. Let me know if you need it and have trouble and I could provide more details. The only place it is used in the "Default Format" is in the "PLAC Editing" template where it is used to update the icon that links to the place record if that records adds a URL link.

in brief - displaying any amount of data is trivial but having that data track changes, if needed, take extra work. As an extreme example, try loading the "Wiki Genealogy Format" which has whole paragraphs of text in a single cell that has collected data from numerous expressions access data in multiple record.

John

Keswicklimey

unread,
Apr 11, 2012, 5:11:42 AM4/11/12
to GEDitCOM II Discussions
Thanks for the help.

Your solution helped in part but I kept playing around.

My final solution was: -

cell Expression @ADDR
set format local("ADDR")&": %!, "&@ADDR.CITY&", "&@ADDR.STAE&",
"&@ADDR.CTRY
set width -1 border none fontsize 10 height 15

this gave me the look I wanted.

The problem is I only do this periodically, and then cannot remember
how the language works.
Reply all
Reply to author
Forward
0 new messages