Add a Portion of an Array Variable in a Data Grid

Add a Portion of an Array Variable in a Data Grid

When adding an array variable onto a data grid it will give you all of the options in the array. What if you were only interested in a portion of the array variable.

I'll be using this variable Newspapers in this example from our holidays database. For this example I will use this as my selection from the Newspapers array variable of The Times or Daily Express.



If I drop a Data Grid on my selection and left drag the Newspapers array variable on to my Data Grid it looks like this. The Data Grid will show all of the options for the array variable. For instance this person Mr Lee reads the Daily Express which is part of my selection, but I'm only interested if he reads The Time or Daily Express. The other newspapers like the Dail Mail in this case don't interest me and are white noise.



If you only want to add a portion of the array variable onto a Data Grid this is how you do it.

When you drag the array variable on the data grid instead of using the left mouse button like normal, use the right mouse button to click, drag and then drop onto the data grid.

You will then be given these options.



Choose Add selected codes

I will choose The Times and Daily Express as those are the only newspapers I'm interested in and then press build.



Now my Data Grid looks like this with just those two Newspapers I'm interested in from the array variable. 



If I had a different selection which was nothing to do with Newspapers, you might get a no no in your Data Grid if the Person only read the Guardian for instance.