<$button>
<$action-setfield list=<<macro>>/>
Calculate list
</$button><$button>
<$set name="val1" filter="[list[]nth[1]]">
<$set name="val2" filter="[list[]nth[2]]">
<$action-setfield $tiddler="targetTiddler" field1=<<val1>>W/>
<$action-setfield $tiddler="EssaiBouton" field2=<<val2>>/>
Set Fields
</$set>
</$set>
</$button>
If you are constructing your list differently than you may be able to use a set widget and a macro like this:
\define thisButton()
<$button>some button label
<$set name="val1" filter="""$(TheList)$+[nth[1]]""">
<$set name="val2" filter="""$(TheList)$+nth[2]]""">
<action-setfield list="""$(TheList)$"""/>
<$action-setfield $tiddler="targetTiddler" field1=<<val1>>W/>
<$action-setfield $tiddler="EssaiBouton" field2=<<val2>>/>
</$button>
\end
<$set name=TheList value=<<macro>>>
<<thisButton>>
</$set>
Hopefully that helps
/*\
title: explicit.js
type: application/javascript
module-type: filteroperator
Filter operator for creating explicit input from string
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.explicit = function(source,operator,options) {
var str = operator.operand;
var results = str.split(" ");
return results;
};
})();
<$set name="test" filter="[explicit[one two three]nth[2]]">
test : <<test>>
</$set>\define myMacro()
one two three
\end
<$set name="test" filter="[explicit[<myMacro>]nth[2]]">
test with variable : <<test>>
</$set>
filter="[explicit<myMacro>nth[2]]"filter="[explicit[<myMacro>]nth[2]]"\define myMacro()
one two three
\end
<$set name="test" filter="[explicit<myMacro>nth[2]]">
test with variable : <<test>>
</$set>
FrD
\define myMacro()
one two three
\end
<$set name="test" filter="[explicit<myMacro>nth[2]]">
test with variable : <<test>>
</$set>
\define myMacro() one two three
\define myFilter() $(myMacro)$ +[nth[2]]
<$set name="test" filter=<<myFilter>>>
test with variable : <<test>>
</$set>