Hi Luis,

This is one solution!

\define deleteIdx()
<$button class="tc-btn-invisible tc-tiddlylink">&#10005;
<$action-setfield $tiddler="$:/Luis/warehouse" $index=<<currentTiddler>> />
</$button>
\end

<$list filter="[[$:/Luis/warehouse]indexes[]]">
<$set name="val" filter="[[$:/Luis/warehouse]getindex<currentTiddler>]">
<$list filter="[<val>match[0]]" variable="otra">
<<currentTiddler>>: <<val>> <<deleteIdx>><br/>
</$list>
</$set>
</$list>



--Mohammad


On Tuesday, September 17, 2019 at 1:48:42 PM UTC+4:30, Luis Gonzalez wrote:
>
> I have a wiki to manage a warehouse and a datatiddler with all the things:
>
> mouse: 2
> keyboard: 5
> monitor: 8
> flopy: 0
> LPT-printer: 0
> etc
> etc
> etc
> ...
>
>
> I want to clean this datatiddler deleting all properties with a value of 
> 0. They are obsolete things.
>
>
> I can show this 0-properties with this code:
>
> <$list filter="[[$:/Luis/warehouse]indexes[]]">
> <$set name="val" filter="[[$:/Luis/warehouse]getindex<currentTiddler>]">
> <$list filter="[<val>match[0]]" variable="otra">
> <<currentTiddler>>: <<val>><br/>
> </$list>
> </$set>
> </$list>
>
>
> But, how can I loop over all zero-properties to delete them from the 
> warehouse data-tiddler?
>
>

-- 
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/0f7d4020-3e4a-401e-ac02-e6f1cdcc4f4b%40googlegroups.com.

Reply via email to