UI Builder dependecies - Gantt chart

AleCerri
Tera Contributor

Hi,

I'm trying create dynamically dependecies between demand and project records with this code in UI Builder Gantt chart through "Record dependencies links" field:

function evaluateProperty({api, helpers}) {
let projects = api.data.look_up_multiple_records_2.results;
const transformedarray = [];

for(let i = 0; i < projects.length; i++){
const res = {
"id": "nome"+projects[i].demand.value,
"source": projects[i].demand.value,
"target": projects[i]._row_data.uniqueValue,
"type": 'fs'
};
transformedarray.push(res);
}
//const records = api.state.ganttrecords;
debugger;
return transformedarray;
}

 

But unfortunately it doesn't works. Anyone can help me?

Can someone told me the structure of object needed ?

Thanks,

 

Alessandro

0 REPLIES 0