Jump to content

jeller

Registered Users - Approved
  • Posts

    4
  • Joined

Converted

  • FusionPro Products
    No

jeller's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

10

Reputation

  1. Hi Dan. I finally got my rule to work. I ended up combining my "Name" field and my "Certifications" field into one FusionPro Rule. With this rule, the user can: (1) make no selections at all for the Certifications; the rule returns "" (2) they can choose "none" and any number of other selections for the Certifications; the rule returns "" since the first string in the array will be "none" (3) they can make multiple selections for the Certifications that do NOT include "none"; the rule returns the certifications they selected Here's the final code I ended up with: var result = Field("Certifications").split(',').filter(String).map(function(s){return s.replace("(R)","®");}); var firstChoice = Field("Certifications").split(',').shift() if (firstChoice=="none"||result=="") return Field("Name"); else return Field("Name")+", " + result.join(", ");I will share this code with everyone. Hopefully it will help someone else with a similar problem. Dan, thanks for your help. I couldn't have done it without you.
  2. Great script Dan. It almost works perfectly. The problem I am having now is that even when the DSF user doesn't select any of the certifications, there is still a comma after the name: Fname Lname, I tried to resolve that by adding a "none" choice and editing the script code you provided: if (Field("Certifications")!="none") { var result = Field("Certifications").split(',').filter(String).map(function(s){return s.replace("(R)","®");}); if (!result) return ""; // no certifications //else return ", " + result.join(", "); } else return “”; That only works if the user selects ONLY the "none" choice, but since these are mulit-select check boxes, they could select "none" along with other choices which also presents a problem. How do I edit your original code to eliminate the comma after the name when the user makes NO selection at all? Your help is greatly appreciated! Happy Holidays.
  3. Dan, Thanks for your response. In FusionPro I have set my certifications field up as a "pick list" when defining my HTML form, then as "check box list" in DSF so that the user is able to make multiple selections. The data that gets returned is then a list of the selected items separated by commas but no spaces (AAMS,CAP,CFA). That's good, but now I need to add spaces between them and some of the entries need register R marks. I have included the ® marks in the value of my pick list in the FusionPro HTML form, but I am not getting that mark in the returned data from DSF. Again, a DSF issue, not a FusionPro issue. I have learned from the customer that there will be a maximum of three certifications for each business card so I think I will try a different tactic on this and go with multiple fields as you suggested; Certification1, Certification2, etc. and make each one a dropdown list. I think I can make this work on my own that way, but now I don't know how to handle the register R marks. I will try create a rule with tagged text for the register mark and make it superscript. Hopefully I can get something to work. I'm still learning and experimenting.
  4. I am setting up a business card for a digital storefront using FusionPro. The customer has certain optional certifications that could appear after their name. The customer wants the DSF user to be able to select from a list of certifications rather than enter the certifications manually, so I have set up a pick list as a multi-select box in my FusionPro HTML Form. I have entered all of the possible certifications (AAMS®, CFP®, CFA, etc.) in the pick list as well as a “none” choice in case they don’t have any certifications. The FusionPro fields are as follows: <Fullname><Certifications> <Title1> <Title2> Q1: Does anyone know how the data is output from the storefront if multiple entries are selected from a multi-select box? Is it an array? Q2: Assuming the data is an array, can anyone suggest a javascript that will extract each entry from the array, then format the certifications so they have a comma and space after each one. * Keep in mind the options are none, one selection, or multiple selections. The first line of the business cards should look like: Joe Smith, AAMS®, CFA I am envisioning a script that basically says, If the field Certifications = “none” then return “”, else return the field Certifications, but with formatting “entry1, entry2, entry3, etc.” I can create basic javascripts using the FusionPro building blocks, but this may be out of my league. I don’t know how to handle the formatting part. Can someone help me with this please?
×
×
  • Create New...