Splitting cascade field editTemplate for the same field with different purpose

I’m studing cascade filter.

Now i have:

tiddler: $:/config/FieldEditorFilters/status
tagged: $:/tags/FieldEditorFilter
text: [<currentField>match[status]then[$:/core/ui/EditTemplate/fieldEditor/status]]

and

tiddler: $:/core/ui/EditTemplate/fieldEditor/status
tagged: -
text: 
<$select tiddler=<<currentTiddler>> field="status" default="">
<option value=''>Seleziona...</option>
<option value='attivo'>attivo</option>
<option value='da-fare'>da fare</option>
<option value='in-attesa'>in attesa</option>
<option value='completo'>completo</option>
</$select>

this is working, great.

BUT

The previous status was for tiddler tagged “project” and I have tiddler that have the status field but with a different purpose.

Now I’ve modified the previous:

tiddler: $:/core/ui/EditTemplate/fieldEditor/status
text: 
<$list filter="[all[current]tag[progetto]]">
<$select tiddler=<<currentTiddler>> field="status" default="">
<option value=''>Seleziona...</option>
<option value='attivo'>attivo</option>
<option value='da-fare'>da fare</option>
<option value='in-attesa'>in attesa</option>
<option value='completo'>completo</option>
</$select>
</$list>

<$list filter="[all[current]!tag[progetto]]">
<$edit-text tiddler=<<currentTiddler>> field="status" tag="input" default="" class="tc-edit-texteditor tc-edit-fieldeditor" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
</$list>

The question is: can I filter in the cascade splitting the different status field uses?

Can I add tag[progetto] to the filter?

tiddler: $:/config/FieldEditorFilters/status
tagged: $:/tags/FieldEditorFilter
text: [<currentField>match[status]<currentTiddler>tag[progetto]then[$:/core/ui/EditTemplate/fieldEditor/status-progetto]]

this is’nt working for me.

What I’m doing wrong in the filtering?

[<currentField>match[status]<currentTiddler>tag[progetto]then[$:/core/ui/EditTemplate/fieldEditor/status-progetto]]

Thanks

Marco

1 Like

Try this:

[<currentField>match[status]] 
[<currentTiddler>tag[progetto]]
:and[count[]match[2]then[$:/core/ui/EditTemplate/fieldEditor/status-progetto]]

This not worked for me.

Now the previous system I’m using is working, I will investigate later on this.

Thank you for you reply.

Hey,
I’m also interested in this cascade combo box; is it ph possible to open a sandbox with the working tiddlers.
In my understanding cascade filter will be also very useful to preselect the value on different levels (via Tags or Fields):
if select progetto
then show only the items of Seleziona
to reselect for example da-fare
and then show finally to select “Priorities”
Best

In your example, you are calling a editTemplate which isn’t your modified version, because it has the original name.

$:/core/ui/EditTemplate/fieldEditor/status-progetto in cascade.
In your modified tiddler template:

tiddler: $:/core/ui/EditTemplate/fieldEditor/status