Discussions

Button to update and save entered data

  • 1.  Button to update and save entered data

    Posted 7 days ago
    Hi all!

    I have a Rich Text button that updates several fields with pre-defined data.  I have a field that the user enters a name (TMNAME) but this data is variable.  How can I get this information saved as part of the button click.  Below is my existing code.  fid_93 is the field where the name is set.


    If([Status]="Approved","",
    [Reject Notes]="",
    "<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); style='background-color:#6BBD57;border:1px solid #6BBD57' href='" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&apptoken=XXXXXXXX&_fid_94=[Dispatch To (Formula)]&_fid_17=In Review&_fid_74=1 &_fid_72=----Approved----&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]) & "'>Click to Approve & Dispatch</a>",

    "<a class='Vibrant Danger' href='" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&apptoken=XXXXXXXX&_fid_80=0&_fid_17=Rejected&_fid_72=----Rejected---- " & URLEncode([Reject Notes])& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]) & "'>Click to Reject Request & Dispatch</a>")

    I can do this with a second button and invoking the save button trigger, but not sure how to combine them.

    ------------------------------
    Todd Griffith
    ------------------------------