Write on Embedded Variable in Workplace Case

Will Wood
Tera Expert

We have an ask where Workplace Agents are able to update an embedded variable on a submitted case within the Workplace Workspace. 

 

The variable (meeting_date) is currently read-only, and needs to be able to be amended by the agent working on the case, and just this field. 

 

2026-03-26 10_01_47-_terry6666@godaddy.com.txt - Notepad.png

What I have tried so far: 

  • Added the roles ot the Write and Read roles on the Variable and Container records (Unsuccessful)
  • Created UI Policy to make variable writable (Works in classic UI, not Workspace)
  • g_form.setReadOnly() doesn't work on Workspaces, tried and works on the Classic, not Workspace
  • Checked ACLS on the Case table and the question_answer table. Even with correct roles, editing is not possible.

Is this just not possible, or is there something I am missing?

 

Thanks for any help provided. 

 

 

1 ACCEPTED SOLUTION

pr8172510
Mega Guru

Hi Will,

Yeah — this is one of those Workspace limitations that catches a lot of people.

What you’re seeing is expected: embedded variables (question_answer records) are rendered as read-only in Workspace, even if:

  • You update variable permissions
  • Use UI Policies
  • Try g_form.setReadOnly()

Those approaches only work in the classic UI, not in Workspace.


Why this happens

In Workspace, variables are not handled like normal form fields. They’re rendered through Now Experience components, and:

  • They don’t respect traditional UI Policies or client scripts
  • Read/write behavior is controlled differently (and mostly locked down OOTB)

What actually works

1. Use a real field on the table (recommended)

If the agent needs to edit meeting_date, the cleanest approach is:

  • Create a field on the Workplace Case table (e.g., u_meeting_date)
  • Make it editable in Workspace
  • Sync it with the variable (optional via Business Rule)

This is the most reliable and supported approach.


2. Sync variable ↔ field (if you must keep variable)

You can:

  • On load → copy variable value to the field
  • On update → write back to question_answer

Handled via Business Rules or Flow.


3. Custom component (advanced)

Technically possible, but:

  • Requires Workspace / UI Builder customization
  • You’d need to override how variables are rendered

Not recommended unless you’re already doing heavy UI customization.


What will NOT work

  • UI Policies (Workspace)
  • Client scripts (g_form)
  • Variable write roles alone
  • ACL tweaks on question_answer

View solution in original post

3 REPLIES 3

pr8172510
Mega Guru

Hi Will,

Yeah — this is one of those Workspace limitations that catches a lot of people.

What you’re seeing is expected: embedded variables (question_answer records) are rendered as read-only in Workspace, even if:

  • You update variable permissions
  • Use UI Policies
  • Try g_form.setReadOnly()

Those approaches only work in the classic UI, not in Workspace.


Why this happens

In Workspace, variables are not handled like normal form fields. They’re rendered through Now Experience components, and:

  • They don’t respect traditional UI Policies or client scripts
  • Read/write behavior is controlled differently (and mostly locked down OOTB)

What actually works

1. Use a real field on the table (recommended)

If the agent needs to edit meeting_date, the cleanest approach is:

  • Create a field on the Workplace Case table (e.g., u_meeting_date)
  • Make it editable in Workspace
  • Sync it with the variable (optional via Business Rule)

This is the most reliable and supported approach.


2. Sync variable ↔ field (if you must keep variable)

You can:

  • On load → copy variable value to the field
  • On update → write back to question_answer

Handled via Business Rules or Flow.


3. Custom component (advanced)

Technically possible, but:

  • Requires Workspace / UI Builder customization
  • You’d need to override how variables are rendered

Not recommended unless you’re already doing heavy UI customization.


What will NOT work

  • UI Policies (Workspace)
  • Client scripts (g_form)
  • Variable write roles alone
  • ACL tweaks on question_answer

Ankur Bawiskar
Tera Patron

@Will Wood 

is it editable by admin?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Nope!