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.

Script to copy image from web link into container field

Featured Replies

Gents, would you please help me to create a script?

balloons.thumb.png.7a482e46f5c606641a7f6b5fab203f03.png

That's what the "insert from URL" script step is for.

But we'd have to know more about what the source URL / web site does or allows to help you better.

If your URL points directly to the image, then you can simply use the Insert From URL[] script step to insert the image into your container field.

  • Author

please, check my script:

 

 

 

 

script.png

Your loop will always stay on the first record because of line 2.  That line needs to move to before the Loop step

  • Author

doesn't work as expected:

 

don ballon 2020-06-30 20-07-54.png

Do a quick test to verify that the file is actually a picture:

- right-click the container and do "export field contents" and save it with the proper extension that you know it is (jpg? png?)

- inspect the file in your OS, open it

- if it is a picture then right-click the container again and choose "insert picture" and select your file

if this all works then you have your routine to script:

- use the "insert from URL" to insert into a *global* container

- use the 'export field contents' script step to the temporary folder using a placeholder file name

- use the "insert picture" script step to grab the file back and insert it into the proper destination container

  • Author

Wim

it's not a picture, I don't know why. Though, the link says it's a picture.

Any ideas?

None.

Except that in general terms grabbing assets from a URL like this isn't a good way to integrate.  Does the site have an API that will give you the data in a proper form?

  • Author

Well, how can check if it does?

You check on their website and/or you ask the website owner.

50 minutes ago, stan111 said:

doesn't work as expected

It works as expected with the link you posted above. If it doesn't work with another link, then post the URL.

 

  • Author

that's what I get when use the link above. That's odd if you get a different result.

3.png

Edited by stan111

6 minutes ago, stan111 said:

That's odd if you get a different result.

But I do:

insertImage.fmp12

  • Author

sure it works! my fault: I used the wrong field to copy from...

 

thanks a lot!

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.