Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copy VL choice to clipboard?

Featured Replies

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

Solved by Raybaudi

Go to solution

No portal.

 

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

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?

  • Author

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!

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

  • Author

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!

  • Solution

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

  • Author

Ah! That did the trick. Many thanks!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.