Skip to main content
Question

Help with URL Button formula to select from multiple choice field


Hi, 
I have put the below URL formula in a button. The objective is to create a new record and populate field ID 31 (this is a multiple choice field) with "Daily Cost". 

URLRoot() & "db/" & [_DBID_NEWITEMS] & "?a=API_GenAddRecordForm&_fid_47=" 
& "&_fid_32=Daily Cost"

& URLEncode ([Record ID#])& "&z=" & Rurl()

When I press the button the new record is created but instead of selecting "Daily Cost" the formula creates another multiple choice selection "Daily Cost2". Any advice on my formula would be appreciated. 

Thanks,
This topic has been closed for replies.

try this

URLRoot() & "db/" & [_DBID_NEWITEMS] & "?a=API_GenAddRecordForm&_fid_47=" 
& "&_fid_32=" & urlencode("Daily Cost")

  • Registered
  • April 28, 2017
There is an error with the code where your record id is?  Its not linking that properly, so its actually amending that status with the record ID.
Try it on a different record and my hunch it will be a different number "Daily Cost3

Chris,
Matthew is correct.  Are you creating a child record?  if so, you need to also populate the field for [Related Parent] whatever fid that is, with the record ID#.

  • Registered
  • April 28, 2017
you need to have the fid of the [Related Parent] so the [Record ID#] can be written to that field in the new form.

You might have deleted something when you modified the button, but here is a clean example.

URLRoot() & "db/" & [_DBID_NEWITEMS] & "?a=API_GenAddRecordForm&_fid_8=" & URLEncode ([Record ID#])& "&_fid_32=" & URLEncode ("Daily Cost")& "&z=" & Rurl()

where fid_8 is the field ID on the NewItem table called [Related XXXXXX]

  • Author
  • Registered
  • April 28, 2017
Thank you both for the quick reply and solution. The final code worked perfectly. 

This was my first attempt and URL coding (thanks to your URL Formulas buttons for Dummies app). 

Cheers,
Chris

Great, thx for letting us know. We were double teaming you :)