Displaying data using two user IDs

I am trying to compare data of two different users but firstly, I need to display the activitylog data using two different user ID first. 

I'll have the user type the names that they want to compare with, and the table will show up with only the data of those two users, which is what I want

 The question is how do you display the data only from the two users


Hi Yao Teck Ong,

I'm not exactly sure what's the full experience you're aiming for, but you can always add one extra Filter to your Aggregate that restricts the ActivityLog to those two users:

ActivityLog.ActivityUserID = <first user's Id> or ActivityLog.ActivityUserID = <second user's Id>

Hope this helps!



Why not make 1 we block with as input parameter a userid.

Then on your screen use 2-column widget and add the web block 2 times, one on the left content and one on the right.

Regarding the compare action you could build up a structure in the webblock with all the user data that should be part of the compare and use an event to pass that back to the screen. Then you can compare it there.

If the structure contains a lot of data you could make it more efficient maybe to serialise the structure to a JSON string and generate a MD5 key and pass that to the parent screen for comparison.




 I agree with Jorge Martine's suggestion. That is the best way to show the Two specific users at the same time.

Or you can able to create an Advanced SQL query to fetch it. 

Thank you,


Hi ,

If you want to show both user data from activity log I think use advance sql with in condition.pass both user id in parameter.


Rahul Sahu

Rahul and Sudip, 

SQL should be used only for bulk operations or when an aggregate does not make life easier. 

Does not seem to be the case to use SQL here. 


Yes, I know But he can able to use  IN operator to show the selected two User details in two-column or Row.

I hope this make sense,

Thank you,


Hello Sudip, 

Yes, he can do that, but it is not necessary, as there are only two users to compare and a simple OR does the trick in an Aggregate. 

Use an aggregate if possible, instead of SQL. Not only it is simpler, and automatically optimized, as it makes the code easier to understand and maintain. 


Yes, I can agree with you on this Suggestion. But that can also be possible. Needs to apply as per the Requirements. If there is not possible to use Aggregrate then it can be able to use it. But always aggregate is the best option to use.

Thank you,