LizChartrand
5 years agoQrew Cadet
Rich Text Multivariable Button w/ CSS color Help
Hi!
I had worked out the multi-variables for this Rich text button:
When clicked the first time do the actions listed in MIGRATE.
when clicked again do the Steps in DELETE.
It was functioning fine, so I wanted to add another layer and use personal branding colors instead of the standard QB/Google colors noted in Magic Buttons.
Then something went wrong.
My button visually looks like it should initially, but you cannot click it to trigger Step 1, var text MIGRATE.
I'm thinking I'm missing something in the final If() statement at the very bottom of the formula written below.
Does anyone have any suggestions about what I might have missed?
Thanks for your help!
Rich Text Button Formula
//Step 1 Migrate
var text MIGRATE =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Team Member ID#] &
"&apptoken=..." &
"&_fid_115=" & URLEncode(UserToName(User())) &
"&_fid_116=true" &
"&_fid_121=" & URLEncode(Today()) &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Team Member ID#]);
//step 2 Delete
var text DELETE=
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord" &
"&rid=" & [Team Member ID#] &
"&apptoken=..." &
"&_fid_119=" & URLEncode(UserToName(User())) &
"&_fid_120=true" &
"&_fid_122=" & URLEncode(Today()) &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Team Member ID#]);
var text GMMIGRATE =
$MIGRATE;
var text GMDELETE =
$DELETE;
//button colors
var text bgcolorone = "#e5a652";
var text txtcolorone = "white";
var text styleone =
"style=\"text-decoration: none; width: 120px; text-align: center; background:" & $bgcolorone & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolorone & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
var text bgcolortwo = "#787d84";
var text txtcolortwo = "black";
var text styletwo =
"style=\"text-decoration: none; width: 120px; text-align: center; background:" & $bgcolortwo & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolortwo & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
If(
[Gmail Migrated Confirmation]=false and [Gmail Account Deleted Confirmation]=false,
"<a " & $styleone & "href='" & $GMMIGRATE & "'>Start Migration</a>",
If([Gmail Migrated Confirmation]=true and [Gmail Account Deleted Confirmation]=false,
"<a " & $styleone & "href='" & $GMDELETE & "'>Migration Complete - Pending Removal</a>",
If([Gmail Migrated Confirmation]=true and [Gmail Account Deleted Confirmation]=true,
"<a " & $styletwo & "'>>Complete - Gmail Removed</a>"
)))
------------------------------
Liz Chartrand
------------------------------
I had worked out the multi-variables for this Rich text button:
When clicked the first time do the actions listed in MIGRATE.
when clicked again do the Steps in DELETE.
It was functioning fine, so I wanted to add another layer and use personal branding colors instead of the standard QB/Google colors noted in Magic Buttons.
Then something went wrong.
My button visually looks like it should initially, but you cannot click it to trigger Step 1, var text MIGRATE.
I'm thinking I'm missing something in the final If() statement at the very bottom of the formula written below.
Does anyone have any suggestions about what I might have missed?
Thanks for your help!
Rich Text Button Formula
//Step 1 Migrate
var text MIGRATE =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Team Member ID#] &
"&apptoken=..." &
"&_fid_115=" & URLEncode(UserToName(User())) &
"&_fid_116=true" &
"&_fid_121=" & URLEncode(Today()) &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Team Member ID#]);
//step 2 Delete
var text DELETE=
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord" &
"&rid=" & [Team Member ID#] &
"&apptoken=..." &
"&_fid_119=" & URLEncode(UserToName(User())) &
"&_fid_120=true" &
"&_fid_122=" & URLEncode(Today()) &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Team Member ID#]);
var text GMMIGRATE =
$MIGRATE;
var text GMDELETE =
$DELETE;
//button colors
var text bgcolorone = "#e5a652";
var text txtcolorone = "white";
var text styleone =
"style=\"text-decoration: none; width: 120px; text-align: center; background:" & $bgcolorone & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolorone & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
var text bgcolortwo = "#787d84";
var text txtcolortwo = "black";
var text styletwo =
"style=\"text-decoration: none; width: 120px; text-align: center; background:" & $bgcolortwo & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolortwo & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
If(
[Gmail Migrated Confirmation]=false and [Gmail Account Deleted Confirmation]=false,
"<a " & $styleone & "href='" & $GMMIGRATE & "'>Start Migration</a>",
If([Gmail Migrated Confirmation]=true and [Gmail Account Deleted Confirmation]=false,
"<a " & $styleone & "href='" & $GMDELETE & "'>Migration Complete - Pending Removal</a>",
If([Gmail Migrated Confirmation]=true and [Gmail Account Deleted Confirmation]=true,
"<a " & $styletwo & "'>>Complete - Gmail Removed</a>"
)))
------------------------------
Liz Chartrand
------------------------------