This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Search Dialog: How to get other Properties?

ergr - Tuesday, May 14, 2013 9:06 AM:

Hi all,

How can we get a specified property of a selected Item from the Search Dialog? For ex: If I select an User from User Search dialog the User's name will be displayed in the field.  If I need to get any other property of the selected User (ex: 'cell') how do I get that.  

If any coding required, please help me with some sample code.

Thank you

 



Brian - Tuesday, May 14, 2013 4:53 PM:

The properties displayed in the search dialog are determined by the properties that have the "hidden" field unchecked in the Item Type definition. Go to Administration,  Item Types,  search for User, edit and select the property you want to display and make sure the "hidden" check box is unchecked. 

You can also get access to all of the fields using the Advanced Search option on the search dialog,  just the same as in the main search grid.

Hope this helps, 

Brian



ergr - Thursday, May 23, 2013 4:43 AM:

I think I have not explained my question properly.  

In my ItemType I added a property whose DataType is 'Item', Data Source is 'User'(Field name on Form is User' s Email).  On creating a new Item, When I select an User say 'Demo User' from the Dialog the field displays the Selected User' s name(Firstname+last name).  Like:         User' s Email: Demo User

If I want to display the Selected User' s 'E-Mail' in the field, How can I do?

 Thank you



Brian - Thursday, May 23, 2013 6:52 AM:

Hi ErgR,

OK. Now I understand.

Item Data type fields display the 'Keyed Name' of the item in the form where the item is displayed.

If you have a look at User you will see that the keyed name is First + Last name.

The keyed name is determined by the Properties that have the "Keyed Name Order" set. Open an Item Type and look for the column "Keyed Name Order" in the Properties tab.

Set the Properties that you want to be the keyed name here by giving them the numbers 1, 2, 3, 4, 5 etc. You can define up to 10 fields.

The keyed name must be unique and is displayed in all forms where the Item data type property is displayed.

The other way of seeing this same information in particular cases rather than everywhere is to add another Property to the Item Type of data type "Foreign".

A Foreign data type requires another Property in the Item Type to be of data type Item and you can select any property of this other Item to display as a read only field.

The second approach is probably better for what you want.

Hope this helps,

Brian.



ergr - Friday, May 24, 2013 7:15 AM:

Hello Brian,

Thanks for your help, I tried in second way it worked.  But I was thinking that I will get the value in same field, I mean User' s Email: [email protected] Instead of User' s Email: Demo User.  

Any way this is a good solution for my problem.

Thank you



akshay kadam - Friday, August 23, 2013 8:47 AM:

Hi,

I also have some problem to get the selected item from search dialog box. I am populating search dialog by using code, but i am unable to get that selectedobject . Please help me how to do this.

Thanks.