Forum Discussion

JasonJohnson2's avatar
JasonJohnson2
Qrew Cadet
6 years ago

GenAddRecordForm only able to add one field of data

I have created a button to use API_GenAddRecordForm but need it to populate 2 fields with data from the other table. No matter what I do it will only populate the first fid listed no matter which is first. I know I have done this before but don't ever recall having such issues with it. I don't see what I am missing, it is simple stuff but I am too blind to see it.

"?a=API_GenAddRecordForm"
& "&_fid_8=" & [Record ID#]
& "&_fid_6=" & URLEncode([Next Issue Number]);
  • Looks good to me, can I see you whole formula?  Also on your record where the button is, is there a value n the field [Next Issue Number];
  • There is a value in [Next Issue Number]. When I flip the order the issue number will populate but not the related field. Here is the rest minus the style for the button.

    var text URL= URLRoot() & "db/" & [_DBID_ISSUE_LOG] & "?a=API_GenAddRecordForm"
    & "&_fid_8=" & [Record ID#]
    & "&_fid_6=" & URLEncode([Next Issue Number]);

    "<a " & $style & " href=" & $URL & "z=" & Rurl()
    & "> Create Issue </a>"
  • :)  \
    Missing the & in front of the z=... so you were contaminating the last entry.  It did not know when the _fid_ stuff ended and the z= .. began, so it was trying to stuff that z= ... text into a numeric field.



    "<a " & $style & " href=" & $URL & "&z=" & Rurl()
  • Perfection. The more I stared at it the more I couldn't see it but it was just one of those days. Thanks Mark for the assist.