May 9, 200322 yr I've tried everything--how do I put a button inside a portal row that will insert contents of a field from that portal row (or the related record) into another field? No matter what row I click in, the button always pastes the data from row #1 of the portal.
May 9, 200322 yr If you put the button in the first row of the portal, you should see it on every row in Browse mode. With a script such as: Set Field [target, related::text] ... the related::text should go into the target field.
May 9, 200322 yr Author I had the button showing up in every row, but no matter what row I clicked the button in, it always used the first row's data. Using Set Field, as you suggested, made it work correctly. I was using Insert Calculated Result, which for some reason makes no distinction as to what row is in use and just uses the first related record. The problem is, Set Field erases the previous contents. I want to be able to append the data to the field, which is why I was using Insert Calculated Result. Why do these two commands behave differently in the data they choose to use? Basically, I'm making a list of pieces of data from the different portal rows, which I pick and choose from the portal by clicking the buttons. When I'm done, this list is just a text field that can be edited any way I please. Maybe the workaround is to Set Field to an intermediate field and then insert the contents of that field to the target field.
May 9, 200322 yr I don't know about your button problem but you can still use the set field script step. SetField[YourField, YourField & AppendedText] Your are setting the field as itself plus the appended text. Pete
May 10, 200322 yr My guess is that "Insert Calculated Result", which depends upon the destination field being visible on the layout, "clicks into the destination field" upon execution and thus loses the context of which portal row you were on. Kind of like clicking out of the portal row and into the destination field manually. Set Field is a much better choice in general, as it doesn't require the destination field to be visible on a layout and doesn't use the clipboard (as Copy and Paste do). -bd
May 10, 200322 yr Author That makes sense, LiveOak. And I forgot that I can use the field contents as a variable in the SetField calculation. All is well.
Create an account or sign in to comment