Arcade concate Function

423
4
03-18-2022 01:13 PM
by Anonymous User
Not applicable

We are using Field Maps app to collect data.  A part of this data is a persons ID number.  When the user populates the ID number, I also want to have an option to view their photo.

Using the calculate field and the SQL expression allows us to view the photo.

CONCAT('URL', fieldname)  works!

When using it this way, the user enters the ID number in one field, and then in another field they can click the link to see the photo.

My first question is how do I write this in Arcade?  I saw the CONCAT function, but its very complicated to me.

My second question - is there a way to allow the user to input the ID number and then be able to click the ID number and display photo rather than having a separate field with the link.

Ideally I would like for them to just click the ID number and have the photo display. I saw this custom attribute display to link properties and I was wondering if this would work for me. If they click on the ID number then that would link them to the photo.  I’m not sure if it would work since first I need to create the URL.

AnnettePoole1_0-1647634369271.png

 

 

 

 

0 Kudos
4 Replies
RyanBohan
Occasional Contributor III

Great question.

First you need to generate the URL with an arcade expression.  I am using longitude instead of the employee id

RyanBohan_0-1647636917770.png

Then add a link, with the arcade express as the URL 

RyanBohan_1-1647637266899.png

If you want the image to automatically show in the pop-up you can the source html with something like this

RyanBohan_2-1647637551536.png

 

by Anonymous User
Not applicable

Hello, one more question.  The arcade statement works great, but when I do not have an id, then the entire url is displayed with no id. I have practiced with the Iff, with no luck. If I wanted to display photo if true, and if not true display "No Photo", how can I make this work? Thank you. 

 

0 Kudos
by Anonymous User
Not applicable

Hello, 

I figured it out by using IIf(subject < 99999, "No Photo", subjectimage)

Basically if there isn't a photo, No Photo displays, but if there is a photo then a hyperlink displays and the user can click on the hyperlink. 

My next question how can I change the hyperlink to say "Click Here" instead of showing the actual URL?

 

0 Kudos
by Anonymous User
Not applicable

If I understand this correctly, the only issue is I would have to add all my field attributes I want displayed now to the Custom Attribute Display. Right? This is great though and it works if it was my only field as I have 117 fields.

0 Kudos