Conditional Rendering and Edit of field based on other 2 field values

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=arguments[0], value = arguments[1], mode = 'read';<br>if (field.row.CreatedById === skuid.utils.userInfo.userId) mode = 'edit';<br>skuid.ui.fieldRenderers[field.metadata.displaytype][mode](field,value);

thanks for quick reply Matt…lemme try these options