Access the displayable value of a Choice data type from a Code Studio > Record

I have a choice data type named Task Type used on a Tasks data object.

I want to get the choice value of say Authorisation, and not DTCxxxxxxxxxxxxxxxxx.

Here is extract of code

var recordId = presenter.get_displayable_value(); 											
var taskRecord = cs.record(recordId); 														
var userId = cs.get_session_user_id(); 														
var userRecord = cs.record(userId); 														
var taskUserId = taskRecord.get(cs.ref('field_task_user_id')); 								
var taskRef = taskRecord.get(cs.ref('field_task_ref')); 	

// I need help here to get the choice value
var taskType1 = taskRecord.get(cs.ref('field_task_type')); 	// returns DTC0001949GBLLK1
var taskType2 = taskRecord.get(cs.ref('field_task_type','displayable')); // returns DTC0001949GBLLK1

I tried using displayable, but still only get “DTC0001949GBLLK1”

Thanks
JonathanFS

Hi Jonathan,

It looks like your last line has a misplaced bracket. It should read like this:

var taskType2 = taskRecord.get(cs.ref('field_task_type'),'displayable');

Carl

Thanks Carl.

I can now use the value
image