This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 3, 2012, 10:01 PM
90 Posts

Based on multiple keys in one view, look up associated records in another view

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 4
I've created a view that gets me a couple hundred people, through very complicated select criteria. This, but not that if Tuesday, except if the person wears red hats, etc. The kind of criteria that an ordinary end user could probably never do through a search. All people records have a stored UUID in them. Call this people view.
 
A separate view I'll call activity view. All logged activities have in them the UUID of the person they relate to, and a date field (amongst other fields, of course.) Both views in same db.
 
What I want to do now in an xpage page is based on the UUIDs of the people in the people view,
(a) display only the activities that have those people's UUID in them -- there might be about 500 activity report records related to those people, I'd say;
(b) display those activities in the xpage categorized by year.
 
Is this possible in xPages?
Mar 4, 2012, 11:00 AM
56 Posts
Re: Based on multiple keys in one view, look up associated records in another view
Hi,
 
I think it is possible, though I don't think I really understand the requirement. =)
 
But you should build your own view control by using repeat controls. You can compute the collection of the needed people and activities in the repeat control and display them in the way you like. For categorization you should use sections. It is not that easy, you have to write some code, but if I understand correctly what you want to do, this way is better than trying to get it done with a standard viewControl.
 
Maybe you can post some examples of the data and how you want to display them, maybe we will be able to help you in a more specific way.
Mar 4, 2012, 11:51 AM
272 Posts
Re: Based on multiple keys in one view, look up associated records in another view
The simple answer is: yes you can!
 
As Matthias wrote above, you can do this f.e. with nested repeats. Or you can modify a view column  and add a repeat control there to get the data joined as you describe. There are a lot of ways to fit your requirements.
 
Sven
 
Mar 5, 2012, 12:01 AM
90 Posts
Re: Based on multiple keys in one view, look up associated records in another view
Well, Matthias, let me try to explain in a different way.
 
In a view VIEW A (sorted by Person UUID), say 1000 activity documents.
 
I want to grab about 250 of those, and bring them back to the xpage, and sort them by year (not by Person UUID.)
 
The 250 activity records that I want will be those whose UUIDs match people in another view VIEW B. (Those people in that other view have been selected by a view selection formula.)
 
So, say in VIEW B I have three people: Bob (UUID 19762), Mary (UUID 2222222), Mark (UUID 333333)
 
I want to go to VIEW A, grab all activity documents that have their UUIDs in them.
 
Return to xpage
 
Present just the activity, like this:
 
> 2011
7 April 2011 -- Mary -- Letter
 1 Jan 2011 -- Bob -- Email
 
> 2010
12 Dec 2010 -- Mark -- Phone Call
7 July 2010 -- Mary -- Email
 
 
 
 
 
 
 
 
 
 
 
 
Mar 5, 2012, 2:57 PM
56 Posts
Re: Based on multiple keys in one view, look up associated records in another view
Hi,
 
yes this should be possible with nested repeats, in the first repeat you loop all the people, and in the nested repeat, you take the value from the person and do a lookup for your activities. The rest is some visual stuff.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal