December 12, 200025 yr G'day All I have a problem where I have 2 fields (fields "b" & "c") that must be filled in on entry of data in another field (field "a"). Field b is based directly on field a, it's actually the data in field a cleaned up. field c is then based on field b. I've come to the conclusion that I have to use a plug-in/extension for this & have downloaded doScript from Step Up Software as a start. Trouble there is that doScript is Mac only & while that suits me fine the solution I'm working on may need to run under Windows as well. Any suggestions for other plug-ins that may work which are available for Win as well as Mac? ... or any suggestions for non plug-in ways I can manage this? ------------------ Cheers, Pedro
December 12, 200025 yr Maybe i don't understand completely, but why wouldn't calculations fields work? If B is based on A, then everytime A changes, so will B. And the same if C is based on B. . .
December 13, 200025 yr Author P'haps some more explanation is needed. This stuff is bits of genome data & arrive in a terrible mess. Field a [actually "sequence"] is the original data. Field b ["sequenceClean"] is that data cleaned up. Field c ["sequenceReverse"] is "sequenceClean" as a comma delimited list with the characters in reverse order. Thus if "sequence" contains "A...B* c,D", "sequenceClean" will return "ABCD" & "sequenceReverse" should return "D,C,B,A". Thanx to the suggestion made "sequenceClean" is now returning the desired result as a calculation but I don't think I can manage the same with "sequenceReverse". The script that I currently have calculating "sequenceReverse" is ... Set Field ["sequenceReverse",""""] Set Field ["sequenceTemp","sequenceClean"] Loop Exit Loop If ["l < 1"] Set Field ["sequenceReverse","sequenceReverse & Right(sequenceTemp,1)&If(l > 1,",","")"] Set Field ["sequenceTemp","Left(sequenceTemp,l - 1)"] End Loop "l" is simply a calculation field that returns the length of "sequenceTemp", I could do away with it & replace it with "Length(sequenceTemp)" & may do so. ------------------ Cheers, Pedro
December 13, 200025 yr You can do it with a calculation, but you'll need an upper limit to the number of items in a sequence. If the maximum is four, then this calculation should work: Choose(
December 13, 200025 yr Author Thanx chuck but sadly the strings range from empty to around 200 characters. ------------------ Cheers, Pedro
December 14, 200025 yr Well, it's going to be a heinous calc, but my point was that it is possible, since you do have an upper limit (200). There is another possibility, though. First of all, ScriptScheduler (from Waves In Motion http://www.wmotion.com) is cross platform. Also, there is a solution if you want to avoid plug-ins entirely. You could do something like this. It requires a global field I'm calling gSequence: Set Field [ gSequence, sequence ] Go to Field [ Select, sequence ] Loop
Create an account or sign in to comment