Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Set Image Title Programmatically

I'm looking to automate an image link to a thumbnail, is there a way to use a CCS GUI or NITRO Forms command to set the image title in addition to the URL?

Uploaded files:
  • image_title.png

Hi NinetySix,

Please let us know whether you are referring to add images in ‘Picture Library’ or ‘Hyperlink or Picture’ column in a custom list. Also, let us know how the items are created, are they created manually, using custom actions or NITRO Workflows.

I'm referring to the 'Hyperlink or Picture' column.  Perhaps there is a better/easier way to do this, but here is my current process:
-Upload photo into picture library
-Copy link from uploaded photo
-Open related item (via NitroStudio Edit Form) in custom list "Contacts"
-Paste picture link into 'Picture Link & Name' column (pictured in original post)
-Modify picture link to use the thumbnail version of the image instead by adding "_t/" before the file name and "_jpg" before the file extension
(this is the part I'm planning to automate on value change, but would then also like to update the image title to something other than the link)

Using the SharePoint thumbnail version from the Picture Library allows for a useful small profile picture for a contact form while preserving the high-resolution original image, negating a need to do picture resizing for each photo.

Hi NinetySix,

Please configure Form Event Actions, ‘Update Form Controls’ action to modify picture URL on column value change. Refer below sample articles:

https://www.crowcanyon.help/article/610/

https://www.crowcanyon.help/article/664/

Specify the JavaScript in ‘Format Value using JavaScript’ to modify URL.

I'm able to modify the URL itself, the question I have is how to also set the image title (part that says "Enter Image Title" in the image of the first post).

Please let us know if you are updating the URL in ‘Picture’ column manually as described above or with automated process using form event actions in NITRO Forms/Custom actions/NITRO Workflows.

URL manually updated via pasting the picture link.
Automatic process on value change form event action to evaluate if link manually pasted is a thumbnail type, and if not - automatically modify it to become one.

Please navigate to NITRO Forms designer for the list -> Edit the form event action configured to evaluate and modify the URL -> Edit ‘Execute Script’ action -> Append the below given script to existing execute script action. With this script, manually updated image title will not be updated, only the URL will be updated in ‘Picture’ column.

Note: Please find attached script.

 

 

Uploaded files:

I'm able to update the URL via this script and other means.  Updating the image title programmatically is still what I'm trying to achieve though.