Forum Discussion

JulieMeeker's avatar
JulieMeeker
Qrew Cadet
9 days ago

Formula Url Buttons

I have a button that opens a Pre Use Check and the Formula is a case statement that looks at the asset type and open the correct checklist based on the asset type.  It was working but now is invisible on the form.  So I tried to build a "test form" and still shows up blank and I also tried to create a new Formula URL button but now I get a Refused to connect error.  Any help would be appreciated.  Support has not been able to help.  They sent me the link to the Check my Formula documentation.

Here's the formula:  

Case([Type],
//Wake boat pre-use check
"Wake boat",
URLRoot() & "db/" & [_DBID_WAKEBOAT_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_25=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Large boat pre-use check
"Large boat",
URLRoot() & "db/" & [_DBID_LARGE_BOAT_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Small boat pre-use check
"Small boat",
URLRoot() & "db/" & [_DBID_SMALL_BOAT_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//PWC pre-use check
"PWC (jet ski)",
URLRoot() & "db/" & [_DBID_PWC_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_24=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Paintball gun pre-use check
"Gun",
URLRoot() & "db/" & [_DBID_PAINTBALL___BEFORE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_12=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Electric Motorcycle pre-use check
"Electric Motorcycle",
URLRoot() & "db/" & [_DBID_ELECTRIC_MOTRCYCLE_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_16=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Canoe pre-use check
"Canoe",
URLRoot() & "db/" & [_DBID_CANOE_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Electric Bike pre-use check
"Electric Bike",
URLRoot() & "db/" & [_DBID_ELECTRIC_MOUNTAIN_BIKE_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_24=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Golf Cart pre-use check
"Golf Cart",
URLRoot() & "db/" & [_DBID_GOLF_CART_PRE_USE] & "?a=API_GenAddRecordForm&_fid_24=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Kayak pre-use check
"Kayak",
URLRoot() & "db/" & [_DBID_KAYAK_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_18=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Bike pre-use check
"Bike",
URLRoot() & "db/" & [_DBID_MOUNTAIN_BIKE_PRE_USE_CHECK] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//UTV/ATV pre-use check
"UTV",
URLRoot() & "db/" & [_DBID_UTV_ATV_PRE_USE_CHECKS] & "?a=API_GenAddRecordForm&_fid_38=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
//Truck/Car/Van pre-use check
"Truck/Car/Van",
URLRoot() & "db/" & [_DBID_TRUCK_CAR_VAN__PRE_USE] & "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])& "&z=" & Rurl()
)

  • Thank you for trying to help.  I found that the issue was being caused by the Embed as iframe option.  I had that checked and when I unchecked that option, my button began working properly!  

  •  

    Where on the form is the field [Type] that is the input to the Case Statement?

  • Since [Type] is there, your Case statement should be evaluated.   Any chance you have it on a Tab or Section that is being hidden by a Form Rule?

    • JulieMeeker's avatar
      JulieMeeker
      Qrew Cadet

      So that is just a "Test" Form.  I intentionally was trying to eliminate any dynamic form rules.  I do have rules in the original form but those control what related checklist records appear on the page.   

  • Please indulge me on this one.  If you custom that form and look at the Elements, do you see the field?

  • Thank you for trying to help.  I found that the issue was being caused by the Embed as iframe option.  I had that checked and when I unchecked that option, my button began working properly!