Hi Yafim!
I’ve noticed a few mistakes in the code, snippet with commentary will follow.
export function button6_click(event, $w) {
$w("#ifc_data").onReady(() => {
var tools = '';
var strategies = '';
for (var t = 0; t < 14; i++) {
//i++? your variable is 't' in this scope.
tools += selections[t];
}
for (var s = 15; s < 44; i++) {
//i++? your variable is 's' in this scope.
strategies += selections[s];
}
$w("#ifc_data").setFieldValue('digitaltools_pdf', tools);
$w("#ifc_data").setFieldValue('strategies_pdf', strategies);
// 'digitaltools_pdf' and 'strategies_pdf'
// are your valid field name(*)?
});
}
It seems like you use here, in the button_click function, a variable (‘selections’) from the function you wrote before but the function itself is never called.
(*) Please check the setFieldValue API to make sure you used it correctly.
Doron. ![]()