Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4271 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

post-76798-0-24608400-1363195644_thumb.p

Posted

No portal.

 

Just use the script step Copy, which allows you to specify the field and select entire contents.

Posted

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?

Posted

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!

Posted

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 [ ]

Posted

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!

Posted

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

Posted

Ah! That did the trick. Many thanks!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.