Stéphane,

I had the same issue and I solved it by creating a special button, which adds both a tag and one or more fields.

When using it for some time it occurred to me that - if I need both a tag and a field with always the same contents, something is flawed with my data model or my processes, since I am creating redundant information stored in different places.

And it took only a short time until these redundancies made me very unhappy....

Also see Tones last sentence: "what if the field already exists" - also a way to become unhappy ;/


Pit.W

Am 28.01.2021 um 12:02 schrieb TW Tones:
Stéphane,

/Can tag adding, trigger field creation?/

To answer this question directly if you provide the method to add a tag, like construct your own button, you can always add an additional action to create a field.

I am sure we can find a way to hack the existing add tag system to also add a field but do you want this field added every time any tag is added?

When you are ready explain what you are trying to achieve with this tag and field and when or if, its always needed, what if the field already exists etc...

Regards
Tones

On Thursday, 28 January 2021 at 00:50:03 UTC+11 Misterel85 wrote:

    Hi Tones,
    Thanks for your reply.
    Sorry if I didn't clearly express 'what I would like', and sorry
    if providing steps on how I was seeing the mechanism I had in mind
    didn't help. I'll try to improve what I have already done and
    rephrase it accordingly.
    Anyway, the macro you provided is very interesting and could be
    really useful. It should be added to TiddlyWiki's documentation
    which doesn't provide any examples about the tag-picker.
    Also thanks for your 'standard nomenclature' you recently posted
    about. This is a great piece of work!
    Cheers,
    Stéphane



    Le mardi 26 janvier 2021 à 01:37:43 UTC+1, TW Tones a écrit :

        Stéphane L.

        You are aware that in your section *So, here's what I would
        like:*  you are in many ways forcing the solution rather than
        truly stating "what you would like". Perhaps avoid tiddlywiki
        jargon and ask again, then responders can suggest solutions
        beyond the limitations you are implying.

        As far as I can see, In database speak you want multiple
        values in your source field, there are many ways to achieve
        this in tiddlywiki.

        I recently discovered we can use the tag-picker macro against
        another field, try this;

        Source tags: <<tag-picker tagField:"source">>
        <$list filter="[{!!source}enlist-input[]]">
          <<tag>>
        </$list>

          * You can also trigger actions on selection with the tag picker.


        Regards
        Tones
        On Monday, 25 January 2021 at 00:48:10 UTC+11 Misterel85 wrote:

            Hi,

            I started gathering all the drama activities I have
            collected over the years from miscellaneous sources into a
            TW single file.

            To quote the source of an activity (= one tiddler per
            activity / exercise), I have used so far:

              * a tag, itself tagged as 'Source', and that holds the
                main source reference in its text field (website,
                book, event title and description);
              * a 'source_detail' field in the activity tiddler, that
                contains the  reference details of the activity, such
                as the book page number, etc.

            Both the source tag's text field and the 'source_detail'
            field are then transcluded into the activity, thanks to a
            macro adapted from Tobias Beer's filter and list examples
            
<http://tobibeer.github.io/tw/filters/#all%20current%20tags%20of%20type>.

            That works great when the activity has only one source.
            Some (nearly) identical activities, however, can be found
            on several sources: books, web pages, notes from events I
            took part in, etc. And I would like to quote them all in
            the activity tiddlers.

            So, here's what I would like:

             1. I create an activity tiddler.
             2. I create the corresponding generic source tag
                tiddler(s) if they don't already exist. Ex. a tiddler
                tag whose text field holds info about a (hypothetical)
                'dramatis.com <http://dramatis.com>' website would be
                called 'dramatis' and tagged 'Source'.
             3. For every time I add a source tag to the activity
                tiddler, TW checks whether a corresponding source
                detail field exists in that current activity tiddler.
             4. If not, it retrieves the name of the tag and creates a
                new field named after that tag. In the example above,
                a corresponding field named 'dramatis_detail' or
                simply 'dramatis' would be added in the current
                activity tiddler.
             5. If I delete a source tag (ex. the 'dramatis' tag), the
                corresponding 'dramatis' field would also be deleted.
                (That step may not be necessary if step 3 is implemented.)


            Hope my explanations were clear. I can't work it out
            because I've been a TW beginner for months, I can't
            understand everything in the very technical and
            programer-oriented TW documentation, and so far, my needs
            have always been very basic. Time for me to improve my TW
            knowledge!

            Do you think something like that could be done? If not,
            would anybody happen to think of a similar solution on how
            to manage multiple sources and reference details, and the 
            different steps to implement it?

            Thanks.

            Stéphane L.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/881321cc-c7a2-4e10-ab5f-0c8091b6740cn%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/881321cc-c7a2-4e10-ab5f-0c8091b6740cn%40googlegroups.com?utm_medium=email&utm_source=footer>.


_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte 
E-Mail-Adresse mitnehmen! https://www.eclipso.de

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6dca8c87-75c1-bd81-af7b-d0c61a809346%40eclipso.ch.

Reply via email to