New User (please be patient!) trying to filter records in OnClick

New User (please be patient!) trying to filter records in OnClick

  

I believe I'm on the latest version and my environment is in the cloud.  

I have two entities, joined by ID attribute.  First entity holds the date, userid, and a couple of other attributes, including the ID attribute that is automatically created.   Second entity holds the detail of the record, with the created attribute "Entity1ID" that joins the two together.  I have confirmed the join in the aggregates and I can see the data I want to show.

I have my initial screen showing the items in Entity1 in a list, and when one record is selected, I want the next screen to show all the Entity2 records that have same "Entity1ID" value as the Entity 1 record that is selected.  There could be up to 5 records in Entity 2 that need to display.  

Right now it's just showing every record in Entity2 that has a value in the Entity1ID attribute and itsn't filtering them correctly.

Just can't make it do it.  

Is this an OnInitialize process?  Or an OnClick from the previous screen?  I can grab the correct record number that should be showing but I can't put that value into an expression that will show just that record.  

Any help with this would be appreciated...

FYI, the name on this account is Adam Martin - but I'm the developer (Suzanne).  


Solution

Hi Suzanne,

Are you navigating to another screen when clicking on the entity1 in the list? 

If so, could you pass the Entity1 identifier as an input parameter to the page you are navigating too, and then querying in the preparation of the second screen on Entity2, filtering on Entity2.Entity1Identifier = The input parameter Entity1 identifier.

So the query will only pull the Entity2s based on the Entity1 Identifier that you click on.

Let me know if this helps,

Justin

Solution

Hi Justin!  Thanks so much for your response!  

Yes, that is exactly what I want to do.  I work in a different platform most of the time, so I am still adjusting to terminology for OutSystems.  When you speak of preparation of the second screen - where is this done? Is this the OnClick workflow?  Or is it the OnInitialize workflow?  I believe I am getting the right Entity1 identifier - I'll drop it on the screen to confirm. 


Thanks Justin - just talking it out and reviewing some of my parameters was so helpful.  It seems to be working now.  On to the next challenge.... :)


Adam Martin wrote:

Hi Justin!  Thanks so much for your response!  

Yes, that is exactly what I want to do.  I work in a different platform most of the time, so I am still adjusting to terminology for OutSystems.  When you speak of preparation of the second screen - where is this done? Is this the OnClick workflow?  Or is it the OnInitialize workflow?  I believe I am getting the right Entity1 identifier - I'll drop it on the screen to confirm. 


Sorry for not getting back to you quick enough, glad it worked out.

Justin