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

Allen Andreas
Administrator
Administrator

Hi,

You'd want to design the form just like you would for anything else, except choose the view as Service Portal:

find_real_file.png

So basically Context Menu > Configure > Form Design

Please mark reply as Helpful/Correct. Thanks!


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

I did exactly this, and they show in this view.  The problem is that the do not show in the End User Portal, when a user clicks on their name and selects Profile (the widget)

Understood. See my response below for instructions.


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

Brian Lancaster
Tera Sage

There is a service portal view but it does not seem to allow for true/false fields.  At least not in my company instance which is Jakarta patch 10.  You can try that but you may have to clone the widget.