pedrofp Posted December 12, 2000 Share Posted December 12, 2000 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 Link to comment Share on other sites More sharing options...
yafreax Posted December 12, 2000 Share Posted December 12, 2000 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. . . Link to comment Share on other sites More sharing options...
pedrofp Posted December 13, 2000 Author Share Posted December 13, 2000 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 Link to comment Share on other sites More sharing options...
Chuck Posted December 13, 2000 Share Posted December 13, 2000 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( Link to comment Share on other sites More sharing options...
pedrofp Posted December 13, 2000 Author Share Posted December 13, 2000 Thanx chuck but sadly the strings range from empty to around 200 characters. ------------------ Cheers, Pedro Link to comment Share on other sites More sharing options...
Chuck Posted December 14, 2000 Share Posted December 14, 2000 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 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8527 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now