Hi,
I created new form that
in the method init I add this code :
public void init() { Query query; QueryBuildRange queryBuildRange1; QueryBuildDataSource queryBuildDataSource; SecurityTreeNode securityTreeNodeMenuItem; ; super(); if(!element.args().caller()) { throw error ("can't run directly"); } securityTreeNodeMenuItem = element.args().record(); MatrixID.text(securityTreeNodeMenuItem.MatrixRole); parmid = element.args().parm(); query = new Query(); queryBuildDataSource = query.addDataSource(tablenum(SecurityTreeNode)); queryBuildDataSource.addSortField(fieldnum(SecurityTreeNode, SecurableName)); queryBuildDataSource.addSortField(fieldnum(SecurityTreeNode, SecurityLevel)); queryBuildDataSource.orderMode(ordermode::GroupBy); queryBuildRange1 = query.addDataSource(tablenum(SecurityTreeNode)).addRange(fieldnum(SecurityTreeNode,MatrixRole)); queryBuildRange1.value(queryValue(MatrixID.valueStr())); SecurityTreeNode_ds.query(query); } }
I want to get all marked Record when I click on button validate
I add this code in the method clicked
void clicked() { int recordsCount; SecurityTreeNode _securityTreeNode; str recordMarked; super(); recordsCount = SecurityTreeNode_ds.recordsMarked().lastIndex(); // Total number of marked records. if(recordsCount ==0) { throw error("Veuillez choisir un élément !"); } else { _securityTreeNode = SecurityTreeNode_ds.getFirst(1); while (_securityTreeNode) { _securityTreeNode = SecurityTreeNode_ds.getNext(); } element.task(2876); } }
But I don't get any values .