1 of 1 people found this helpful
Take a look at the GetValue ( ) function and the ValueCount ( ) function.
Depending on the specifics of your situation, you may need a looping script or a recursive custom function in conjunction with these functions.
The basics are thus:
If you have a value list, 'theList':
GetValue ( theList ; 1 ) = "RED"
GetValue ( theList ; 2 ) = "GREEN"
GetValue ( theList ; 3 ) = "BLUE"
ValueCount ( theList ) = 3
I am making a database of genes so I have hundreds of these entries that I need to split up. Would there be a more efficient way to go about this?
Well what I gave you was the basic functionality.
You can automate this process via scripting or custom functions. It just depends on how your data is structured and specifically what your desired result should look like.
It would be very helpful to look at your file to get a better idea of how to attack this problem. The short answer is likely, "yes," there are several efficient ways to do this.
And your calculation pulls the data and puts it into a return separated list?
And you want each of these items to be its own record, rather than this list?
My field is set to a calculation to list all of the genes that match the certain criteria of the peak number into that record. I want to either figure out how to make all of the lists in this field to be their own record in a new table.
Sounds like you will need a separate shadow table instead of that calculation. And then just show a portal to that, since you seem to already be connected to an external source table.
Maybe you could post the calculation you are using...
Seeing "remote table", it may be List(remote::field)
then in the remote table there are records for each value already.
Go to related Records [ remote table ]
Go to Layout [ new table ]
Import Records [ from remote table ]
Same name appears in many list, so the steps need to be looped.
Not sure what you are doing with the commas, but return delimited lists are easier to deal with.
A good question is where is this data coming from originally and why does it need to make this step of a list in one record and then move to multiple records? Why not have single records direct from the original data?
The issue with this middle step is that I am assuming after you move these to individual records the record with multiple entries needs to be deleted. This will do nothing but slow the process down.
@philip_jaffe gave you the basic tools to use. This generally is done with a loop script that runs through a return delimited list and creates new records. How you build this process exactly depends on how you get the list and if you need to constantly adjust the criteria easily.
Ok. The next question I have is are you using this data in a relationship somehow or is this just for data processing to get results output? I do not see any key fields in the SG_test_mm10 table.
I do see you are using chromosome as a key field, but it really should be a separate keyID field.