• 0
RkaydianFlower

Display values instead of numbers for multi-select listbox

Question

I also posted this in User JavaScript and CSS Discussions because I'm not sure whether custom script was required to achieve this result.

I have a submission form DataPage with a multi-select listbox field. I would like the values the user selects in that field to be passed into the notification email. Currently, only numbers representing the values display.

This is the parameter in the email: 
Profession : [@field:Profession]

This is what it displays in the notification email:
Profession : 4,5,6,53

I would like it to display this:
Profession : Accountant, Actor, Agent/Manager, Artist

Is this possible?

Thank you.

 

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0
On 5/9/2017 at 3:12 AM, RkaydianFlower said:

I also posted this in User JavaScript and CSS Discussions because I'm not sure whether custom script was required to achieve this result.

I have a submission form DataPage with a multi-select listbox field. I would like the values the user selects in that field to be passed into the notification email. Currently, only numbers representing the values display.

This is the parameter in the email: 
Profession : [@field:Profession]

This is what it displays in the notification email:
Profession : 4,5,6,53

I would like it to display this:
Profession : Accountant, Actor, Agent/Manager, Artist

Is this possible?

Thank you.

 

Hi RkaydianFlower

I believe that it should be possible after 9.7 Caspio Bridge platform release.

http://howto.caspio.com/release-notes/caspio-bridge-9-7/

Quote

Lookup Fields

  • Lookup fields can now be included in Pivot reports rows and columns.
  • When passing a Lookup field as a parameter, you can now choose its hidden Value or Display value.

 

 

Hope this helps.

Share this post


Link to post
Share on other sites
  • 0

Hi Vitalikssssss: 

This news sounds promising. However I'm not seeing where or how to choose whether the hidden or display value will appear in the mail.

Here is what I see on the Advanced panel for this Multi-Select Listbox field. No mention of parameters. I tested survey submission again and I am still getting the number values instead of the display values.

 

 

 

Multi Select Listbox Advanced.jpg

Share this post


Link to post
Share on other sites
  • 0

I do not actually see an answer to this question, and I am having the same problem. I don't even get the list of numbers though; my two list box fields are just not included as an option to add to my email reports.

Share this post


Link to post
Share on other sites
  • 0

To get the list of numbers, you need to add

Yourfieldname : [@field:Yourfieldname]

to the body of the notification mail body. It's not automatically included there by Caspio.

To solve this problem I switched to using a regular listbox with the javascript below. Data type is Text. On the desktop, multi-selecting requires holding down Command or Ctrl while selecting, so not ideal. But it works like a charm on mobile.

 

Substitute your field name for "XXXXX"

Place this javascript in footer:
<SCRIPT LANGUAGE="JavaScript">
 /* "fieldName" is the variable name for the listbox type form element field. */
   var fieldName = "InsertRecordXXXXX";

   var x=document.getElementsByName(fieldName);
   x[0].multiple=true;

</SCRIPT>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now