True/False value appear on User Portal Widget

Donald Small1
Tera Expert

I have created some True/False fields for the sys_user record that I want to be available on the User Self Service portal, so that they can select them.  I have set them as available when you navigate to the sys_user table, select a user and go to the Self Service View, but how do I get them to show when a user goes to his profile from the portal?

1 ACCEPTED SOLUTION

Good call out. I looked in to this. You'd need to clone the User Profile widget, then make a few tweaks, one of which is to comment out or remove this line, 158, in the client script section:

if (models[tableName][field] && models[tableName][field].type === "boolean") return false;

Which is basically telling it to not even display if there are true or false fields. So I commented this out, then in the HTML, I added a line like this for example, on line 34:

<p ng-if="::displayField('sys_user', 'u_name_of_field', true)"><strong class="pad-right">${What I Want to Show Here}</strong><sp-editable-field editable-by-user="data.isLoggedInUsersProfile" table="sys_user" table-id="data.sysUserID" field-model="data.sysUserModel.u_name_of_field"></sp-editable-field></p>

Basically replace u_name_of_field with the column name of the field you want to add and don't forget to edit inside the ${ } what you want it to display, then finally in the client script section, for example, line 7/8, I did:

sys_user: ['name', 'introduction', 'title', 'department', 'location', 'photo',
							 'manager', 'company', 'u_name_of_field'],

 

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

10 REPLIES 10

It worked for me only doing the fist step. commenting out the line about not display Boolean fields.