Forum Discussion

QuintenQuinten's avatar
QuintenQuinten
Qrew Assistant Captain
8 years ago

Copy of multiple choice option after clicking button

I have a button set up in an email notification which changes a multiple choice field to one of the options when clicked. However when doing this, a copy of option that I want is created. On the bar chart report that I made that includes this multiple choice field, I have two columns that show the same option because one was clicked with the button and one was change manually by selecting from the multiple choice field. How do I get rid of the copy and combine them all into one?
  • If similar values are appearing in records, then there must be some difference between the values.  Maybe one has a trailing or leading space, for example.

    You need to locate the cause of the bad data entry and then mass update to change the bad data to good data.
  • QuintenQuinten's avatar
    QuintenQuinten
    Qrew Assistant Captain
    The trailing or leading space did not work. I pasted the multiple choice option directly into the button and still got a copy. Not sure what else to do.
  • QuintenQuinten's avatar
    QuintenQuinten
    Qrew Assistant Captain
    var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]

    & "&apptoken=b9pzvpjdbfk42zck9xawjk99nx5"

    & "&usertoken=b3iezd_xfm_bpqsutvbg5gc46c7aepnhdm8me43"

    & "&_fid_282=true"

    & "&_fid_279=PLS Review Complete";

    "javascript:" &

    "$.get('" & 

    $URL & 

    "',function(){" &

    "location.reload(true);" &

    "});" 

    & "void(0);"

    "PLS Review Complete" is what needs to be selected in the multiple choice field.
  • I suspect that it will work if you do this

    & "&_fid_279=" & URLEncode("PLS Review Complete");

    The issue is that you are building a URL string.  Whenever you include in a URL any characters, including spaces, which are not one of the A-Z or 0-9, then you must URLEncode.

    Think of it this way.

    You have never seen a URL in your life which has spaces in it.  They do not exists, at least ones that work properly.  So when you have any special characters including spaces as a possibility in your data, then you must URLEncode.