209
Views
10
Comments
How do i display text attributes related to ReferenceID from another entity?
Application Type
Reactive
Service Studio Version
11.53.41 (Build 62020)

I want to display the name of the USER and not the USER.ID that is referenced in my Aggregate. 

These References all point to USER.ID:



If I drag and drop these ReferenceID attributes into the UI, it will display the USER.ID and not the text of the user's name

My question is:  can I use an expression to display the USERS NAME or other TEXT (attributes) related to this referenced USER.ID?


Thank you to anyone who knows the answer to this. 

2022-06-23 06-21-50
Siddharth Vyas

Yes it can be done .Can you please provide the OML

2023-07-13 14-19-38
Joseph Funaro

Unfortunately, I am unable to send OML. Is there specific information I can provide to aid in your solution response?

2022-06-23 06-21-50
Siddharth Vyas

Hi.
Can you provide me the details of your aggregrate or database diagram 

2023-07-13 14-19-38
Joseph Funaro

Do you know of a way to use an expression to pull in the USER name from the USERID?

2023-01-26 16-03-24
Ana Agostinho


Hello again,

On the users module you have an action to get the name (but it gives you the name of the current user, meaning, the user you are logged in), not from an User.Id generic.

I truly believe you need to do an aggregate (or at least, go to the database) retrieve the user name like I have explained before. 

Best regards, 

Ana

2023-03-16 18-12-52
Michael Chu

Yes, you can do something like this on the aggregate then you can use it as part of the expression to be display in the UI.

Hope this helps.

2023-01-26 16-03-24
Ana Agostinho

Hello Joseph Funaro, 
Basically, on your aggregate you need to add as source also the User entity. Like this: (this is just an example)

Note: use the join that satisfies your requirements, something maybe like: YourTable.OwnerContactId=User.Id. Also note that you should select/use the join clause that fits you case better. 

After this you can see that you have as output this: 

So, instead of having the OwnerContact.Id you can use the User.Name. You will obtain what you want. 

Some links that might be useful to you: 

Best regards,

Ana

2023-07-13 14-19-38
Joseph Funaro

Thank you, everyone, for your suggestions. 

As suggested, I am familiar with adding it to the aggregate and consuming the joined attribute. If possible, I want to avoid that since it throws my data off in the aggregate. 

For clarification, I am using a Master\Detail widget and want to display details of the Master when clicked, which is working fine. I want to add USER contact details to the DETAILS LIST with data that is NOT presently part of the aggregate i am using for the DETAILS\LIST aside from the USER.ID referenced field. 


I am looking for a way through an expression to convert the USER.ID to the USER.NAME without adding the USER_DETAILS entity to my current LIST aggregate that is the source for the DETAILS (right side) of the MASTER\DETAIL widget.


Thank you again. 

2023-01-26 16-03-24
Ana Agostinho


Hello Joseph Funaro, 

Correct me if I understood it wrong, please.
So, you want pass as input User.Id and obtain the User.Name and not have it coming straight form the main entity/table. 

One option is to have other aggregate (separated one) for users with the filter: User.Id=UserId (this one, the input you will send to the aggregate). 
You can set it "Only on demand" (for example when you show the right part) and not "At start" and, as soon you send the UserId it will give you the UserName. 
Is that a viable solution for you? Let me know if it is what you need. 

Best regards, 
Ana

2023-07-13 14-19-38
Joseph Funaro

High-level overview: 

I have customers that own multiple companies which I store in the [PARENT] entity. The PARENT Corporations will have MANY LOCATION(s) address details, and each location will have a (Technical, Clinical, Scheduling, and Owner) contact person which is the USERID reference in the LOCATIONs entity.

Here is my Entity Diagram: 

In the [LOCATIONS] Entity, I reference USER.ID (Multiple times) to the OUTSYSTEMS [USER] Entity for each role attribute (Owner, Technical, Clinical, and Scheduling) in the LOCATIONS Entity. These are presented as dropdowns in the UI to select the corresponding person for each role. These all have the ENTITY IDENTIFIER DATA TYPE set. 

I want to display the NAME, EMAIL, and WORKPHONE attributes from their respective entities on the DETAILS (right side) of the MASTER DETAIL widget. When I add the [USER DETAILS] AND [USER] Entities, it interferes with the LOCATION list details in sources in the DETAILS widget in UI. 

I want to display the USERS.NAME + WORKPHONE + EMAIL address from the above entities diagram and display them in the CIRCLED RED AREA below.  When I bring all of these entities together, the resulting dataset duplicates data for the DETAILS LIST and repeats location data. I think this is related to the multiple "One-To-Many relationships between LOCATIONS and USERS. 


Do I need to scrap this design and approach this a different way?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.