February 25, 200322 yr FM give so many suprises. The button just won't work! I've scouted the forum for solutions but couldn't find any (that I understood). There must be a solution somewhere, cause I think my problem is common. Please point it out to me or help me with a reply! I've go about 15 Text fields. And 20 buttons with different Insert Text strings. The script simply inserts a sentance into the field where the cursor is blinking. All fine. The problem comes that I have put these buttons into a selfrelated Portal. I just don't know how I can get the buttons to work again. I've tried Set field, Perform External script, Go to field, etc. But it won't put the text into the active field again. As soon as I click inside the portal, the active fields get deactivated. I'm not able to use Go To Field with a [specified field] because then I would have to make about 15 different Go To Field scripts, kinda crazy I think. Perhaps the answer is really easy, but you just got to know it. Please advise me! Thanks in advance.
February 25, 200322 yr The Set Field step needs to specify the field through the portal relationship: Set Field [selfjoin::field1, ...] Same with the Go to Field steps.
February 26, 200322 yr Author Thank you Vaughan, Just a quick check to see if I've done it right, because I can't get the Insert Text and Go to field function to work. Which is a bit of a problem for me. I want each of the 20 buttons to add text in a field, not subsitute the contents of a field. I created a Relationship ID = :ID with the name Selfjoin ID is a Unique Number Field The portal that contains all the buttons has a different Relationship. Using Selfjoin Relationship on the Specified Field Field1. Duplicated this 14 times with Field2, Field3 etc. specified, to place the text into the field where the cursor currently is. This only works with the Set field. Like you said: Set Field ["Selfjoin::field1", ""any text""] Set Field ["Selfjoin::field2", ""any text""] Set Field ["Selfjoin::field3", ""any text""] etc. This wil put "any text" in all the 15 fields. Actually I just want to ADD text in the active field. I think I'm almost there....
February 27, 200322 yr Well since you have placed buttons inside an portal there is no way to preserve active field when clicking on them. I don't see many other choice other than creating sufficent number of buttons outside of portal( or having some numeric indicator for selecting proper related record) each adding text into active field from different related record, Dj
March 2, 200322 yr Author Didn't expect this problem to be such a nutcracker. By now I've traced the problem down to be able to know which of the 15 fields was LAST active when the button in the portal is clicked on. Perhaps somebody has this figured this out which makes it possible to use Insert Text script from a portal.
March 2, 200322 yr Well, I just created a sample that has a self join portal. If you use set field but don't specify the field, just the calculation Set Field, "", "This is my text for this field" It remembers the field that is currently active. HTH
March 2, 200322 yr Good catch Andy. This can the kind of solution I was looking for one of my files. Thanks
March 3, 200322 yr Sorry for the glitch. Didn't realize that the fields are actually inside the portal containing the buttons. Dj
Create an account or sign in to comment