hi all
i'm using 6.3 community, please can anyone help my!!!
Is there a way to have a property group element enabled only for some user and disabled for others users??
I define an automation rule so after uploading a file automatically the system add a property group and a windows appear with some fields to fill (invoice number, date, note, etc). I'll an input field was ReadOnly for some users so i define the automation rule with 2 action, in this way:
1) AddPropertyGroupToWizard, to add property and to show the form to fill
2) ExecuteScripting for make an input field readonly=false/true based on ROLE
I've no error but input field was always readonly=true...
thanks a lot
i'm using 6.3 community, please can anyone help my!!!
Is there a way to have a property group element enabled only for some user and disabled for others users??
I define an automation rule so after uploading a file automatically the system add a property group and a windows appear with some fields to fill (invoice number, date, note, etc). I'll an input field was ReadOnly for some users so i define the automation rule with 2 action, in this way:
1) AddPropertyGroupToWizard, to add property and to show the form to fill
2) ExecuteScripting for make an input field readonly=false/true based on ROLE
I've no error but input field was always readonly=true...
Code: Select all
please help meimport com.openkm.api.OKMPropertyGroup;
import com.openkm.api.OKMRepository;
import java.util.*;
import com.openkm.dao.DatabaseMetadataDAO;
import com.openkm.api.OKMPropertyGroup;
import com.openkm.bean.form.FormElement;
import com.openkm.bean.form.Input;
import com.openkm.bean.form.Select;
import com.openkm.bean.form.Option;
import com.openkm.util.PathUtils;
import com.openkm.util.FileUtils;
import com.openkm.api.OKMDocument;
String grpName = "okg:protocollo";
String path = OKMRepository.getInstance().getNodePath(null,uuid);
for (FormElement formElement : OKMPropertyGroup.getInstance().getProperties(null, path, grpName)) {
if (formElement.getName().equals("okp:protocollo.registro")) {
((Input) formElement).setReadonly(false);
}
}thanks a lot
