Forum Discussion

Kelly-AnnTainto's avatar
Kelly-AnnTainto
Qrew Cadet
4 months ago
Solved

Nested API Button open form to add input, check box and redirect back to original form

I have another API Button question...similar to my last question.   Using the same table set up (below), but this time the button would be selected if it's for a license that would not be applicable ...
  • MarkShnier__You's avatar
    4 months ago

    I think that you are saying that this button has nothing to do with three of your four tables.   You just want a button to put the record you are sitting on into edit mode on form ID#11, and then you will require the user to input into a field and if they do and save,  then a checkbox will get checked and the user will be landed to display the record.

    var text OpenInEditMode = URLRoot() & "db/" & dbid() &  "?a=er&rid=" & [Record ID#] // Suggested License ID
        & "&dfid=11"; // Not Applicable form ID

    var text UpdateSuggestedLicense=URLRoot() & "db/" & dbid()
    & "?act=API_EditRecord"
    & "&rid=" & URLEncode([Record ID#])
    & "&_fid_18=true" //Check Not Applicable to this Location
    & "&apptoken=MY TOKEN";

    var text DisplayOnRegularForm = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]); 

    $OpenInEditMode

    & "&NextURL=" & URLEncode($UpdateSuggestedLicense)
    & URLEncode("&rdr=" & URLEncode($DisplayOnRegularForm))