Hi Tony, On Mon, Jan 27, 2020 at 1:55 AM TonyM <[email protected]> wrote:
> Mohammad, > > I am not so sure how to read your requirement, here are some ideas, I may > have it wrong. > > I will be honest, I got very confused. Could you give a more extensive > real world example eg; > tiddler = person > tag = invited (to the party) > Test 1 = Paid entry fee (required) > Test 2 = Wearing a suit (required) > > If just one person has not paid, or wearing a suit then NO PARTY > > but are you saying; > > *Given a Filter that results in a list of tiddlers, return nothing if even > one fails to pass a second or third filter?* > > Your Question seems to ask > > [tag[myTag]] has the word xx in their title > OR > [tag[myTag]] has the field myfield > But then you say *So the filter is empty if only one input title does not > match the criteria.* > Yep, all tiddlers shall meet the criteria, if only one fails, then return empty! > > > I would think this we inclusive, To get them into the save filter you need > to generate [tag[myTag]] list twice > [tag[myTag]*word xx in their title*] [tag[myTag]*the field myfield*] > > [tag[myTag]contains:title[xx]] [tag[myTag]has:field[myfield]] > > This will generate a list of tiddlers that meet one OR both criteria > The OR is implied by the space making this two "filter runs" > > NO, this is OR and what I asked is AND. For example if all tiddlers have a field X do some operation IF only one has not, then ignore whole operation. One real case, Set the color to red if all tiddlers filtered have the field color! I know with complex filter operation it is possible to get this in work! But I am looking for a filter operator to this simply and semantically But perhaps what you are asking is > > > * - The filter is empty if only one input title "[tag[myTag]]" does not > match the > criteria [tag[myTag]contains:title[xx]] OR [tag[myTag]has:field[myfield]] > return > nothing- This means in effect if any (1 or more) tiddlers do NOT match both > criteria, return nothing.* > > If I understand this correctly you are asking > > - Give me a list of [tag[myTag]] tiddlers > - Test if any do not meet the criteria > > If we ask > > [tag[myTag]count[]] > We find out how many are eligible > > > [tag[myTag]] +[contains:title[xx]] +[tag[myTag]has:field[myfield]] +[count > []] > we find out how many passed the criteria > > > - For all tiddlers [tag[myTag]] > - Include tiddlers that contain title XX AND include field[myfield] > - The result will be a list of complying tiddlers > - +[Count[]] will count them and give us the number that comply > > A final comparison to see if the eligible are more than those that comply > > > Not sure! > Sharing my notes in full should it provide insight. > In simple words: do an operation on a set of filtered tiddlers if and only if ALL of them pass some crteria if all tiddlers have a caption, then set it if all tiddlers have a color field, then set it to red ... > > Regards > Tony > > > > On Friday, January 24, 2020 at 4:20:24 AM UTC+11, Mohammad wrote: >> >> Which Tiddlywiki operator is inclusive? >> >> By inclusive I mean all the input titles meet the filter conditions. >> >> For example I want to check if all tiddlers tagged with myTag has the >> word xx in their title? >> Or check if all tiddlers tagged with myTag has the field myfield? >> >> So the filter is empty if only one input title does not match the >> criteria. >> >> <$list filter="[tag[myTag]has[myfield]??"> ... >> >> >> >> In the same manner we can think about any filter. This now works by >> limit[1] means if only one input title meets the criteria! >> >> >> --Mohammad >> > -- > 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/453da2bb-e054-4d4b-8ee1-1c76663259ac%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/453da2bb-e054-4d4b-8ee1-1c76663259ac%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAAV1gMBOrRVQHT%2BYPX5fVdcCah6cfF20%3Dv19SrfOds-FvhUmSQ%40mail.gmail.com.

