How to differentiate two types of data in one table?
Question
Application Type
Reactive

HI Team,

My Requirement is like, 

I have a switch tool, on left side its Incident no data and on Right side its Postcode data. So, if i switch to left the Incident No. data only should get displayed and if I switch to right then only the postcode must be displayed. Now, The Data is in One Table only. So, Basically I need to accumulate the searched data from and inputsearch box to this table and need to see if its a Postcode or Incident no and then assign it accordingly in the same table itself. And after this need to display according to the switching option.

How shall I solve this issue?

Solution

Thanks for confirmation. Please have a look into the attached OML. You can adopt the same in your application. 


Feel free to message me in case of any question.

CloneOfForumHelp.oml

Hi Aditya 

You can use the search parameter of your screen to filter your data. Alternatively if the data is in same entity you can maintain an attribute to distinguish the type of data in your common entity and just use your toggle switch to get input for the type of data you want to display. 

Hope it helps. 

I would use CSS as the mechanism to handle this.

Create a table with two columns, and place each desired data type in its own column.  At the cell level in each data type column,  set the Style Classes property such that each data type maps to its own CSS class.  In addition add condition class to each data type cell, Hidden, when the column should not be displayed.

.Incident  

{

  min-width: 20em;

  text-align: center;

}


.Incident.Hidden

{

  display: none;

}

.PostalCode

{

    min-width: 6em;

    max-width: 11em;

    text-align: left

    font-famly: monospace;

}


.PostalCode.Hidden {

  display: none;

}

You could also just use an If widget displaying data type 1 or data type 2 in the same column, but you would still need to set the Style Classes property dynamically  for the column to be styled properly.

I will try this option too. Thanks

Hello @Aditya Chinchole,

If this is still an open item, could you please elaborate on this portion of your request ---

"...So, Basically I need to accumulate the searched data from and inputsearch box to this table and need to see if its a Postcode or Incident no and then assign it accordingly in the same table itself."

1. Let's say the search string is '123456' and it is a PostCode that exists in the table, what should happen?
2. if '123456' does not exist in the table, should it get inserted ('assigned'?) to the table as a PostCode?
3. Does the Searchtext being a Incident# or a PostCode# determine what gets displayed in the table OR is it still the switch that decides that?

Regards,

AJ

Dear Aditya

Are you looking something like this - https://personal-9qwkrkgl.outsystemscloud.com/ForumHelp/SearchData?_ts=637586621344305018


Sample Data is -


Please ignore Design, as I Just tried to make a quick solution for you :) 

Yeah Yes. That was something close to my requirement. Thanks.

Solution

Thanks for confirmation. Please have a look into the attached OML. You can adopt the same in your application. 


Feel free to message me in case of any question.

CloneOfForumHelp.oml

Hello Aditya,

Kindly refer @Manish Gupta's solution.

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