Skip to main content

Hi All,

I have a requirement to display field (in detail page) with in line edit based on 2 other field values,

Req: ‘Title’ is a field on detail page, and Created by & Owner are 2 other field’s exposed in detail page. While editing the exiting record in detail page (by using Edit button), it should allow user to edit the ‘Title’ field for current logged in user only if the loggedin user matches with ‘created by’ or ‘owner’ field value.

tried by creating 2 duplicate ‘title’ field’s and not able to apply rendering b/w 2 duplicate ‘Title’ field’s based on 2 other field values which are related user info.

Thanks

Two options I can think of immediately:

  1. Create a ‘RunningUser’ model, and make your rendering conditions for the duplicate title fields based on whether the created by and owner fields match the single specified value of {{$Model.RunningUser.data.0.Id}} (the current user id).

  2. Use a custom field renderer to do it quickly with something like this in javascript:


var field=argumentse0], value = argumentse1], mode = 'read';<br>if (field.row.CreatedById === skuid.utils.userInfo.userId) mode = 'edit';<br>skuid.ui.fieldRenderersrfield.metadata.displaytype]ymode](field,value);

thanks for quick reply Matt…lemme try these options