Rich S Posted March 13, 2013 Posted March 13, 2013 Greetings, all. Â How would I pull this off (see attached)? It's a dynamic value list from another table and what I want a user to be able to do is click/enable the value choice and have the choice's text copied to the clipboard so it can be pasted into another app's data field. I got as far as figuring out that a script trigger would come into play but after that...? Â IIRC, whenever you enable, by way of a checkbox, a VL item its value is placed at the end of the field list, no? If so, how would I grab the the value from there? Â Ideally, I'd like to be able to code the list so a user can click-and-drag (or copy and paste) a value to the clipboard but I'm guessing that a portal's involved to make that happen but I don't know. Â As always, thanks in advance for your help!
bruceR Posted March 13, 2013 Posted March 13, 2013 No portal. Just use the script step Copy, which allows you to specify the field and select entire contents.
Lee Smith Posted March 13, 2013 Posted March 13, 2013 It is a good idea to avoid the user's clipboard when ever possible. Where is the value going to end up, another application (i.e word etc.), or another TO? If another TO, why not use the set variable and set field?
Rich S Posted March 14, 2013 Author Posted March 14, 2013 I agree, Lee--one shouldn't temporarily store data into the clipboard, but the value will go to another app like Word or a web form; the user knows that the copied value will overwrite the contents of the clipboard so I'm covered there. I tried using the Copy script step and what happens is that it copies all the checked "checkboxed" values, not just the one that's being selected; I need the latter. More coffee!
Raybaudi Posted March 14, 2013 Posted March 14, 2013 Set Selection [ YourTable::YourCheckboxField ; Start Position: Position ( YourTable::YourCheckboxField ; ¶ ; Length ( YourTable::YourCheckboxField ) - 1 ) + 1 ; End Position: Length ( YourTable::YourCheckboxField ) ] Copy [ ] You could even set a trigger ( OnObjectModify ) that fires a simpler script: Set Selection [ Start Position: Position ( Get (ActiveFieldContent) ; ¶ ; Length ( Get (ActiveFieldContent) ) - 1 ) + 1 ; End Position: Length ( Get (ActiveFieldContent) ) ]Copy [ ]
Rich S Posted March 14, 2013 Author Posted March 14, 2013 Thanks, Raybaudi: I got hung up with the Start Position part of the equation for a second--the plus sign on the far right should be a semi-colon to complete the four terms required for Position ...I think. I fired the script as suggested and it's still copying all the value choices, so I'll keep playing with the script. Stay tuned!
Raybaudi Posted March 14, 2013 Posted March 14, 2013 the plus sign on the far right should be a semi-colon to complete the four terms required for Position ...I think. You are somewhere correct... I missed only a semicolon. Try: Start Position: Position ( YourTable::YourCheckboxField ; ¶ ; Length ( YourTable::YourCheckboxField ) ; - 1 ) + 1
Recommended Posts
This topic is 4271 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