Discussions

Expand all | Collapse all

Help with URL Button formula to select from multiple choice field

  • 1.  Help with URL Button formula to select from multiple choice field

    Posted 04-27-2017 22:43
    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,


  • 2.  RE: Help with URL Button formula to select from multiple choice field

    Posted 04-27-2017 22:45
    try this

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


  • 3.  RE: Help with URL Button formula to select from multiple choice field

    Top
    Contributor
    Posted 04-27-2017 22:50
    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


  • 4.  RE: Help with URL Button formula to select from multiple choice field

    Posted 04-27-2017 22:53
    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#.


  • 5.  RE: Help with URL Button formula to select from multiple choice field

    Top
    Contributor
    Posted 04-27-2017 22:58
    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]


  • 6.  RE: Help with URL Button formula to select from multiple choice field

    Posted 04-27-2017 23:26
    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


  • 7.  RE: Help with URL Button formula to select from multiple choice field

    Posted 04-27-2017 23:56
    Great, thx for letting us know. We were double teaming you :)