cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

To take subset of a datatable based on conditions

Yedukrishnan
13-Aquamarine

To take subset of a datatable based on conditions

Suppose a datatable is having 5 columns/datashapefields and there are 5 entries in the datatable, I need to take 3 columns and its corresponding 3 entries from it.

 

Please give a solution!!!!!!!

2 REPLIES 2

You do realize that just because a data table returns more columns than you need, you don't have to use all of them?  If displaying in a datagrid, you can select to hide the columns not needed.  As for what three columns you need, you didn't specify anything useful other than demanding a solution.  

 

Do you need the top three rows, the bottom three rows, three rows based on some other criteria?  For loops with get you the top or bottom three rows.  A query will get you anything in between. Take a look at the TWX help and search for "query".  Then use the snippets for the QueryDatatableEntries service.

 

Next time, perhaps, you provide a bit more info related to what you're specifically trying to accomplish and share what you've already tried.  You'll definitely get more people to respond.

mgoel
17-Peridot
(To:wposner-2)

Hi @Yedukrishnan

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference and benefit of other community users. Thank you in advance.

Regards-Mohit Goel

Top Tags