Forum Discussion
RyanSolutions
8 years agoQrew Member
Hi Shontay,
I'm not sure if this shortens the code, but it may make it a little more readable. By adding more variables it also makes it easier to update the code in the future (e.g. adding more lines of code or making adjustments).
Let me know if this helps!
var text urlRoot = URLRoot() & "db/";
var text projTbl = $urlRoot & [_DBID_PROJECTS];
var text openUrl = $projTbl & "?a=dr&rid=" & [Related Project - From Job] & "&dfid=17" & Rurl();
var text sendUrl = $projTbl & "?a=er&key="& [Related Project - From Job] & "&dfid=17";
var text open = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $openUrl & '>Open Form</a>";
var text close = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $sendUrl & "'> Send Form</a>";
If([# of Projects - Building Forms] = 1,
$open,
$close)
I'm not sure if this shortens the code, but it may make it a little more readable. By adding more variables it also makes it easier to update the code in the future (e.g. adding more lines of code or making adjustments).
Let me know if this helps!
var text urlRoot = URLRoot() & "db/";
var text projTbl = $urlRoot & [_DBID_PROJECTS];
var text openUrl = $projTbl & "?a=dr&rid=" & [Related Project - From Job] & "&dfid=17" & Rurl();
var text sendUrl = $projTbl & "?a=er&key="& [Related Project - From Job] & "&dfid=17";
var text open = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $openUrl & '>Open Form</a>";
var text close = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $sendUrl & "'> Send Form</a>";
If([# of Projects - Building Forms] = 1,
$open,
$close)