Allows user for getting field data from the model.
Smart code
Syntax
GetModalFieldData(VariableName,ModelName,FieldName)
Parameters
- VariableName (Required) – Name of the variable to store the length of the given string.
- ModelName (Required) – Specified model needs to be defined.
- FieldName (Required) – Specified Field needs to be selected.
Direct Code
Syntax
try {
let modelname=”<<Model_Name>>”;
let modelcode=modelname.split(“#”)[0];
let fieldname=modelname.split(“.”)[1];
await OreApibinding.GetModalFieldData(this, modelcode,fieldname).then((response) => {
if(response == undefined || response.status == false){
this.setState({ spinner: false });
return;
}else{
<<Variable_Name>> = response.data
}
})
}
catch(ex) {
OreAlert.alert(ex.message);
}
this.setState({ spinner: false });