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.
Juggernaut

Get Named Object, paste in Container, No?

Featured Replies

I have an object I've named RXREQ, it is a grouped object comprised of a pink rectangle, a dozen fields and some text.

If I copy it in layout mode, go to browse mode, click into a container field (RxContainer)and hit paste, I get a nice image in my container field. Which is exactly what I want. Well not quite, I just looked, I get an image from Layout Mode - no data, just the image you see in Layout Mode. What I want is the object as seen in Browse mode

But try to automate it and I get garbage, and odd garbage at that, text from all over the page.

Edited by Guest

If you're in layout mode when you copy, it is correct that i would capture field names, rather than content.

I would use a product like snag-it (or screen capture and just crop it) and take the image then paste in your container in browse mode. (or more preferable, use insert, picture)

  • Author

I don't see that working in a script. I can do it but it my users need to push a button and have it happen in a runtime solution.

.. It's a really odd request to be honest, and the only way i can see it happening is MAYBE through VBScript and some cheap command line graphics software to allow you to crop.

What i would do is:

Retrieve the location, size and width of the field in question using FM's build in developer functions - Specifically FieldBounds

Prepare a vb script on the co-ordinates provided

In the VBScript

-- Print Screen using inbuilt windows function

-- Save the caught image somewhere

-- Crop using CMD line graphics editing software based on the co-ords provided (alternatively, work out how to do it manually).

-- Save the file somewhere

Export and execute the vbscript using FM's native functions

-- Insert the saved file into your container

To be perfectly honest i think it's more trouble than it's worth but nevertheless, i can't see an easier way of doing it though someone else might.

Enter Preview Mode

Copy [ ]

Enter Browse Mode

Paste [ yourTable::Containerfield ]

Commit Records/Requests

Note that this produces a screen-shoot, i.e. limited to screen's resolution.

Hi Comment.

Although the above takes a screen shot (that's actually quite interesting, i had no clue copy when nothing was selected took a screen shot - thanks a million for that :D ), i believe the OP is after only a certain portion of the screen.

You could make a layout containing just the desired objects, open a new window, go to the layout, adjust window to fit, copy and close the window...

Love your ideas! I just still can't manage to think outside the square that much I'll get there eventually though.

I can apply this myself to a few things i've been putting off for a while so, cheers again comment!

... i believe the OP is after only a certain portion of the screen.

Also you can make some object not printable, so only the printable ones will copy and paste into the container with comment's script.

But that way you will get a large background area included in the picture, effectively reducing the resolution.

Two more points to bear in mind are that going into Preview mode lands you on the first record of the found set, and that if the layout is small enough, you might see more than one record on page. Both can be easily solved, but I thought it should be pointed out.

Hi comment

"But that way you will get a large background area included in the picture, effectively reducing the resolution."

Yes, but the poster can play with the graphic format of the container, ie: Enlarge ( or better: Crop ), mantain original proportions, alignment: Left/Top

  • Author

Tried the 'Preview' solution. Aside from the multiple record problem, when pasted into the large-enough-for-the-original-image container, the image was tiny.

So I gave up and created a calculation field with the items from the RXREQ image parsed into it. Then I script that into the spot where I need it.

Thanks for your ideas.

One of the gotchas with the Preview copy/paste routine is that you generally want to set the margins to nothing on the page you're copying (or on the receiving/printing page). Because otherwise you get them, essentially 2 margins, one from each.

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.