Discussions

 View Only
  • 1.  Edit Record and Gen Add Record

    Posted 06-20-2017 14:45
    I have seen many posts about this already, but they all seem to be for Formula - URL types. Can it be done in Formula Text?

    I just need the button to edit the current record, then genAddRecordForm. 

    Right now I have it on two buttons, here are the formulas;

     "<a class='Vibrant Primary' href='bmvauafk7?a=API_EditRecord&apptoken=d7ssqypbdpghg3d3qv57ac4iy8ig&rid=" & 
    [Record ID#] & 
    "&_fid_15=" & Today() & 
    "&_fid_12=" & URLEncode(User()) & 
    "&_fid_34=true" & 
    "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]) & 
    "'>Processed</a>")


    "<a class='Vibrant Alert' href='bjvbry32b?a=API_GenAddRecordForm&apptoken=d7ssqypbdpghg3d3qv57ac4iy8ig&_fid_55=" & [SL Tax] & 
    "&_fid_56=" & [Tria] & 
    "&_fid_57=" & [Stamping Fee] & 
    "&_fid_58=" & [Fire Marshall Fee] & 
    "&_fid_70=" & [Processed On] & 
    "&_fid_69=" & [Related Policy] & 
    "&_fid_71=" & [Effective Date] & 
    "&_fid_72=" & [Estimated Premium] & 
    "&_fid_73=" & [Processed By] & 
    "&_fid_74=" & [Endorsement Type] & 
    "&_fid_75=" & [Unit Change] & 
    "&_fid_88=" & [Notes/Additional Details] & 
    "&_fid_106=" & [Inspection Fee] & 
    "&_fid_107=" & [Broker Fee] & 
    "&_fid_113=" & [Endorsement #] & 
    "'>+ New Endorsement</a>")

    Any ideas?


  • 2.  RE: Edit Record and Gen Add Record

    Posted 06-20-2017 14:57
    I'm crazy busy now and don't have time to help, but maybe you can help me.

    This code is from an app I worked on, but did not write.  It seemed to work.  I just grabbed the code and saved it and the format I have is unreadable BecauseItIsJustOneLongString.  Those single quotes always mess me up so we need to dumb this down.


    "<a class='Vibrant Danger' href='" & Dbid() & "?a=API_EditRecord&rid=" & [Patient ID#] & "&apptoken=b3ya2etdy9kh2hdshehaabdzyq6e&_fid_252=Failed - Kick Back to CC&_fid_243=Level 0 - Call Center&_fid_247=Missing Patient Information&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Patient ID#]) & "'>Kick Back Missing Patient Info</a>"

    I would love it if you tidied it up so that the formula URL part with the redirects where in a nice clean formula variable, which then can be used in a Vibrant button.

    Then post back your working tidy formula for the Community.


  • 3.  RE: Edit Record and Gen Add Record

    Posted 06-20-2017 15:01
    I actually got mine to work just now as you replied, so don't sweat that. 

    And I can definitely tidy up that formula for you. 


  • 4.  RE: Edit Record and Gen Add Record

    Posted 06-20-2017 15:09
    This is what I came back with when I went and tidied it up, I could go ahead and make the rdr a variable if you would still like, but because it is only one rdr and not a few of them, I don't think you need to declare a variable to state it the one time

    (unless you plan to expand this formula to include other functionalities).

    Let me know, happy to help! It was just missing some quotations,

    "<a class='Vibrant Danger' href='" & Dbid() & "?a=API_EditRecord&rid=" & [Patient ID#] & 
    "&apptoken=b3ya2etdy9kh2hdshehaabdzyq6e&_fid_252=" & "Failed - Kick Back to CC" & 
    "&_fid_243=" & "Level 0 - Call Center" & 
    "&_fid_247=" & "Missing Patient Information" & 
    "&rdr=" & 
    URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Patient ID#]) & "'>Kick Back Missing Patient Info</a>