Discussions

Expand all | Collapse all

Copy of multiple choice option after clicking button

  • 1.  Copy of multiple choice option after clicking button

    Posted 08-03-2017 20:42
    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?


  • 2.  RE: Copy of multiple choice option after clicking button

    Posted 08-03-2017 20:50
    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.


  • 3.  RE: Copy of multiple choice option after clicking button

    Posted 08-03-2017 21:02
    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.


  • 4.  RE: Copy of multiple choice option after clicking button

    Posted 08-03-2017 21:43
    May I see the code for your button?


  • 5.  RE: Copy of multiple choice option after clicking button

    Posted 08-04-2017 01:24
    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.


  • 6.  RE: Copy of multiple choice option after clicking button

    Posted 08-04-2017 01:34
    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.


  • 7.  RE: Copy of multiple choice option after clicking button

    Posted 08-04-2017 02:26
    Yes that did work. Thanks again for the help.