[tw] Re: How to get a record index of a named property from a data tiddler?
If you're just dealing with the months of the year, then the other easy possibility is to make a second data tiddler: *{"oct":1,"nov":2,"dec":3}* -- Mark On Wednesday, February 7, 2018 at 1:18:26 AM UTC-8, oleghbond wrote: > > Dear All, > > I've encountered an issue which I need to resolve, namely: How to get a > record index of a named property from a data tiddler? > > Say, I've got the following set of records in a data tiddler: > > *{"oct":31,"nov":30,"dec":31}* > > > As one can see the number index value of the named property, say, *"nov"* is > 2. > > But how can I get this number index using a macros of a plugin? > > I feel that it should be somehow simply, but I've no idea how. > > I would be grateful for your help. > > Olegh > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9fa7612d-6250-476b-aa65-0228edaa8a78%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
... and I see I must add a reverse[] to the list: <$list filter="1 2 3 4 5 6 7 8 9 10 +[limitreverse[]]" variable="index"> -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1884b144-0dd4-48ff-8a61-df41817128f9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
at last I think this would be better: \define getTheIndex() <$list filter="[enlist[$(indexes)$]nth[$(index)$]regexp[^$(indexName)$]]"> <> \end <$set name="indexName" value="nov"> <$set name="indexes" filter="[[datatiddler]indexes[]]"> <$set name="length" filter="[enlist] +[count[]]"> <$list filter="1 2 3 4 5 6 7 8 9 10 +[limit]" variable="index"> <> -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e0de2822-76a8-4dfd-ae6b-7b5caab9f94d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
instead of the 1 2 3 4 5 I normally use a tiddler that holds all integers from 1 to x in its list field and use the filter [list[integernumberstiddler]limit]] variable="index" -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/817734e3-0158-4055-b579-cc48db854daf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
Hi olegh, sorry I got it wrong. That's more complex... could this work for you? <$set name="indexName" value="nov"> <$set name="indexes" filter="[[datatiddler]indexes[]]"> <$set name="length" filter="[enlist] +[count[]]"> <$list filter="1 2 3 4 5 6 7 8 9 10 +[limit]" variable="index"> <$list filter="[enlistnthregexp]"> <> -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1fa7c0ed-8997-4e20-8a44-ba7765caa33e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
Thank you very much, I would like to clarify a bit the misinterpreting of my request. What you suggest returns the value of the array under char index "nov", which is - 30. Whereas I looked for a method for returning the number index of the char index "nov", which is - 2, just because it is the second element of the array. Any idea? середа, 7 лютого 2018 р. 13:21:48 UTC+2 користувач BurningTreeC написав: > > Hi @oleghbond, > > say your data tiddler is called "datatiddler": > > <$list filter="[[datatiddler]getindex[nov]]"> <> > > gives you "30" as result > > you can do it in different ways. look at > https://tiddlywiki.com/#getindex%20Operator > > BurningTreeC > > Am Mittwoch, 7. Februar 2018 10:18:26 UTC+1 schrieb oleghbond: >> >> Dear All, >> >> I've encountered an issue which I need to resolve, namely: How to get a >> record index of a named property from a data tiddler? >> >> Say, I've got the following set of records in a data tiddler: >> >> *{"oct":31,"nov":30,"dec":31}* >> >> >> As one can see the number index value of the named property, say, >> *"nov"* is 2. >> >> But how can I get this number index using a macros of a plugin? >> >> I feel that it should be somehow simply, but I've no idea how. >> >> I would be grateful for your help. >> >> Olegh >> > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/81bdfb4c-4f82-40fa-91d1-1a131c058298%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
or easy: {{datatiddler##nov}} -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/80f8238d-0fec-4867-aaea-c9e2e55704ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to get a record index of a named property from a data tiddler?
Hi @oleghbond, say your data tiddler is called "datatiddler": <$list filter="[[datatiddler]getindex[nov]]"> <> gives you "30" as result you can do it in different ways. look at https://tiddlywiki.com/#getindex%20Operator BurningTreeC Am Mittwoch, 7. Februar 2018 10:18:26 UTC+1 schrieb oleghbond: > > Dear All, > > I've encountered an issue which I need to resolve, namely: How to get a > record index of a named property from a data tiddler? > > Say, I've got the following set of records in a data tiddler: > > *{"oct":31,"nov":30,"dec":31}* > > > As one can see the number index value of the named property, say, *"nov"* is > 2. > > But how can I get this number index using a macros of a plugin? > > I feel that it should be somehow simply, but I've no idea how. > > I would be grateful for your help. > > Olegh > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/68ce1ef5-18eb-4b9c-a155-9f92c82be91a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.