JasonJohnson
8 years agoQrew Assistant Captain
Button Named after data in a field
I am using a text formula to generate a button and need to do something outside of my skill set. I need the button name to change based on the data in a specific text field. It sounds odd but is actually needed. Here is a sample of the formula.....
// Begin button style
var text bgcolor = "#A5E294";
var text txtcolor = "black";
var text style = "style=\"text-decoration: none;\n\n box-shadow: 3px 3px 1px #888888; \n\n background:" & $bgcolor & ";\n\n border-radius: 3px;\n\n padding: 5px 8px;\n\n color: " & $txtcolor & ";\n\n display: inline-block;\n\n font: bold 700 24px/1 \"Calibri\", sans-serif;\n\n text-align: center;\n\n text-shadow:none;";
// End button style
If([Can work be invoiced?]=false,
"<a " & $style & " href=" &
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & URLEncode ([Record ID#])
& "&_fid_104=1"
& "&_fid_105=1"
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=q&qid=128")
& ">Add to Billing</a>"
,"")
// Begin button style
var text bgcolor = "#A5E294";
var text txtcolor = "black";
var text style = "style=\"text-decoration: none;\n\n box-shadow: 3px 3px 1px #888888; \n\n background:" & $bgcolor & ";\n\n border-radius: 3px;\n\n padding: 5px 8px;\n\n color: " & $txtcolor & ";\n\n display: inline-block;\n\n font: bold 700 24px/1 \"Calibri\", sans-serif;\n\n text-align: center;\n\n text-shadow:none;";
// End button style
If([Can work be invoiced?]=false,
"<a " & $style & " href=" &
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & URLEncode ([Record ID#])
& "&_fid_104=1"
& "&_fid_105=1"
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=q&qid=128")
& ">Add to Billing</a>"
,"")