Discussions

Expand all | Collapse all

Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

  • 1.  Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-21-2017 20:59
    I want to add a button to a form, which when pressed advances the selection on a Text - Multiple Choice field (fid_9)


  • 2.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-21-2017 21:02
    What is the sequence of choices?

    Be you will want to use a case formula within a variable text url.

    Post your sequence and I can throw something together.


  • 3.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-21-2017 21:12

    Thanks.  Had not thought of using a case formula:

    New Lead
    Qualified Lead
    Re-Instated
    Rough Cut Completed
    Comps & Valuation
    Bidding
    Contract
    Exchanged
    Completed
    Tracking
    Lost
    Dropped
    Site Allocation

    The last 4 which are in bold italics you can ignore.



  • 4.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 16:45

    I am struggling with this.  I have created a new field that contains the Case formula.  When I report against this it appears to work properly.  However when I try to incorporate this in the Formula URL for the button, the record does not update:


    var text url=

    URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" &

    "&rid=" & [Record ID#]&

    "&apptoken=ck3rgpbk9q5gtcjxtgiwdhkzhx9"&

    "&_fid_9=" & URLEncode([What is the next Stage]) &

    "&_fid_351=" & URLEncode([What is the next Stage]) ;


    "javascript:" &

    "$.get('" &

    $url &

    "',function(){" &

    "location.reload();"&

    "});" &

    "void(0);"



  • 5.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 17:29
    URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" &


    "&rid=" & [Record ID#]&


    "&apptoken=ck3rgpbk9q5gtcjxtgiwdhkzhx9"&


    "&_fid_9=" & URLEncode([What is the next Stage]) &


    "&_fid_351=" & URLEncode([What is the next Stage])


    I suggest that you just make a Formula URL of just the URL and confirm it works.


    No doubt it will have some kind of error which will be a clue.


  • 6.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 18:18
    Sorry the HTML.  Can seem to paste the error with the HTML


  • 7.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 18:19

    <?xml version="1.0"?>

    -<qdbapi>

    <action>API_EditRecord</action>

    <errcode>0</errcode>

    <errtext>No error</errtext>

    <rid>1549</rid>

    <num_fields_changed>1</num_fields_changed>

    <update_id>1492885116781</update_id>

    </qdbapi>



  • 8.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 18:24
    Ok. So the URL is fine. What actually happens when you push that button? Are you saying it does not refresh the screen


  • 9.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 18:33

    OK. So the when I use my code, the screen refreshes, but the record is not updated.

    When I use your code, it progresses to the HTML above and when I return to the record manually it has been updated.

    So I am guessing the code I have to return me to the record is cause it to fail?



  • 10.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 20:18
    It seems temperamental.  I cannot see if its record specific issue or something else


  • 11.  RE: Need to create a button that advances the selection on a Text - Multiple Choice field to the next entry.

    Posted 04-22-2017 20:22
    Can I see your current formula. I guess you in fact have two different buttons.