Ok, I though going straight to the point would be better, but apparently, context is important when you ask a question…
Sorry pmario, my question wasn’t precise enough.
Please, allow me to explain what I am trying to do.
I currently have multiple “rules” tiddlers containing similar but not always identical fields with different values. Some of theses fields, with their name prefixed with a “Line_” contain HTML codes for table lines with number or texts in their columns.
An other field of the rules tiddlers, common to every single of them, also contain what I call my “import manager”.
It is a list of checkboxes in list mode that will write fields names from their rules-tiddler inside a specific field of the tiddler where they are transcluded. These names are the names of the fields that contain the html lines.
example:
this is in a field of the "Rules_" tiddler and is transcluded inside "topic tiddlers"
<$tiddler tiddler=<<HERE>>>
<$checkbox listField="Import" checked="{{Rules_AAPG!!Line_Innov}}"> AAP Innov</$checkbox><br />
<$checkbox ... [insert as many as needed, but manually, in each rules tiddler]
</$tiddler>
I then have “topic tiddlers”.
Among other thing, they transclude this “import manager”, thus displaying a list of checboxes that will add their “checked” value into a list-field.
this is in the "Topic" tiddler.
field:"Import"
content: "{{Rules_AAP1!!Line_Innov}} {{Rules_AAPG!!Line_Deca}}" (content varies based on checked boxes)
<table>
{{!!Import}}
</table>
This will transclude all the transclusion indicated in “import” as lines in the table.
<table>
{{!!import}}
</table>
became :
<table>
{{Rules_AAPG!!Line_Innov}}{{Rules_AAPG!!Line_Deca}}
</table>
and thus :
<table>
<tr>
<td><!--Icon--> </td>
<td><!--Name--> </td>
<td><!--Value--> </td>
</tr>
<tr>
<td><!--Icon--> </td>
<td><!--Name--> </td>
<td><!--Value--> </td>
</tr>
</table>
displaying "Lines_" selected by the user
It work perfectly, but I have to manually create the list of checkboxes.
I am trying to automatize this procedure.
The objective remain to write transclusion names inside the “import” field of the current tiddler.
<$let HERE=<<currentTiddler>> Rules={{!!RulesName}}>
<$tiddler tiddler={{!!RulesName}}>
<$list filter="[all[current]fields[]prefix[Line_]]" variable="field">
<$list filter="[all[current]get<field>]" variable="value">
<$set name="RulesP1" value={{{ [<field>addsuffix[}}]addprefix[{{!!]] }}}>
<$set name="RulesP2" value={{{ [<Rules>addsuffix[<RulesP1]addprefix[{{]] }}}>
<$checkbox tiddler=<<HERE>> listField="Import" checked=<<RulesP2>>> <<field>></$checkbox><br />
</$set>
</$set>
</$list>
</$list>
</$tiddler>
</$let>
The objective is to generate, for each “Line_something” field in the tiddler specified in {{!!RulesName}}, a checkbox that will add the value {{NameOfTheRuleTIddler!!Line_something}} into the list that is stored in the field {{!!Import}}.
I got everything to work, with the exeption of assembling the transclusion code, as the two variable won’t merge into a new one.
I can already create checkboxes that will add {{!!Line_something}} to the list-field. I want to add the tiddler name into this.
Well, of course, if someone have a better idea to manage these imports, I am open to any suggestion…
But the objective remain to give the opportunity to a final user to select fields to import as line into a table, just with checkboxes.
To sum it up, I have two variables, <<a>>
and <<b>>
, and I want to transform them into a variable <<ab>>
, but I don’t know how to do it, if only it is possible.