Skip to main content
Question

Select Case and URL Button Not working/disppears

  • September 3, 2017
  • 0 replies
  • 62 views

URL button disappears in Forms and Table with Select Case statement. It work perfectly when using this alone (URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  [Record ID#] & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=10",) in the Formula box.

Any ideas?

Formula below

Case([Inspection Type],
"FSV",URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  [Record ID#] & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=10",
"Interim Inspection",URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  [Record ID#] & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=11",
 "FSV Pre-Check",URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  [Record ID#] & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=2")

This topic has been closed for replies.

  • Registered
  • September 4, 2017
I'm not 100% sure why its not working, but an easier way to structure things is to use variables.

for example.

var text URL1="google.com"
var text URL2="facebook.com"

Case([Status Field],
"Option 1", $URL1,
"Option 2", $URL2,
null)

  • Author
  • Registered
  • September 22, 2017

Thanks Matthew,

Tried this will variable and I am getting an syntax error (Declaration must end with a semi-Colon). Formula below.

var text URL1= URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" & URLEncode  ([Record ID#]) & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=10;
var text URL2= URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  URLEncode ([Record ID#]) & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=11;
var text URL3= URLRoot() & "db/bm2icyt3r?a=API_GenAddRecordForm&_fid_29=" &  URLEncode ([Record ID#]) & "&_fid_3="  & "&z=" & Rurl()  & "&dfid=2;


Case([Inspection Type], "FSV",$URL1,"Interim Inspection",$URL2,
 "FSV Pre-Check",$URL3, Null)


Each of these three lines can't be like this
missing closing quote
 
& "&dfid=10;

needs to be this
 & "&dfid=10";

  • Author
  • Registered
  • September 22, 2017
Thanks - that worked but the button still doesn't show up on the form or table.

The most likely cause is that the Inspection Type is not one of those three choices.  Are you super sure about that?

  • Author
  • Registered
  • September 22, 2017

Inspection Type is the name of the field, and the choice are the  attributes.

Open Inspection Form is where the button should appear.

Note - I still need to expand the Case statement to include other inspection types