We have added few scripts in hide component on workspace now want to make dynamic

taylor13
Tera Contributor

Hello @Community Alums 

 

on the workspace i want to hide button from few users so, on the container level we have added hide component functionality in the workspace.

The script as below--

 

function evaluateProperty({api, helpers}) {
  if(api.data.look_up_record_1.result.risk_assessment_methodology.value.toString() == '0d732d001b6961101cadedbb274bcb48' || api.data.look_up_record_1.result.risk_assessment_methodology.value.toString() == "6a7e49661b6ca190b8f5986a274bcb19"){
    if((api.data.look_up_record_1.result.sub_state.value != null && (api.data.look_up_record_1.result.sub_state.value.toString() == "l1_review" || api.data.look_up_record_1.result.sub_state.value.toString() == "rework_initiated") && api.state.isOneOfReviewrs == true)||(api.data.look_up_record_1.result.state.value.toString() == "6" && api.state.isOneOfApprovers == true)){
      return false;
    }
  }
  return true;
}

 

 i want to modify the sys_id with gs.getProperty method in ui builder. when i tried to do that but gs showing undefined in the script how can we do that? 

 

0 REPLIES 0