Default boolean checkbox true or false with profile dependancy

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Senior Jisc Management profile should have a checkbox checked on new record load

Another profile should have the record unchecked on new record load.

How can this be easily achieved, without creating a new page?

I am open to the idea of using Javascript snippet on page load action if somebody can help me with the code, my example below isn't working, and i'm not sure how to fix it! Thanks for your help

if ($User.Profile.Name == 'Senior Jisc Management') { 
        var model = skuid.$M('Event');
        var row = model.getFirstRow();
        var alldayevent = true;
        model.updateRow(row,{IsAllDayEvent : alldayevent});
Photo of Glenn Daly

Glenn Daly

  • 1,560 Points 1k badge 2x thumb

Posted 1 year ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 43,156 Points 20k badge 2x thumb
Replace $User.Profile.Name w/ skuid.utils.userInfo.profileName.
Photo of Glenn Daly

Glenn Daly

  • 1,560 Points 1k badge 2x thumb
hero! thanks very much
Photo of David Forder

David Forder

  • 2,384 Points 2k badge 2x thumb
Model actions would work also.. for those of us java challenged )
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 12,034 Points 10k badge 2x thumb
To build on David's suggestion, you could set up a UI-only formula field that returns a checkbox. The formula could use the merge variables discussed here:

Namely, {{$User.profileId}} could be used with a CASE operation (see "CASE" and examples here: 

The formula could look like this:
CASE({{$User.profileId}},"[add your 18-digit profile Id #1]", TRUE,"[add your 18-digit profile Id #2]", FALSE)