Forum Discussion

benrizz17's avatar
benrizz17
Qrew Member
4 months ago

Automatic Form Generation

I have an app with multiple tables for equipment inspections, work orders, and some others. My equipment inspection form includes a variety of multiple choice questions (with Pass or Fail as the options for most), and a "Result" field at the end that displays as Pass if all checks pass, or Fail if any of the checks fail. My goal is to automatically generate a work order (which is another form in the Work Order table that can also be created on its own) in the event that the Result is a Fail when the Daily Inspection is saved. 

Any thoughts on this? Thank you!

  • As an update, I was able to show a "Create Work Order" field that when selected opens up the Work Order form. If there is a way to either automatically create the form with the relevant info from the Inspection form, or to at least populate the Work Order form with the relevant info from the Inspection form that would be what I am looking for.

    Thanks!

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Yes. We can help you here with any url formula buttons

      Here is an example. 

      URLRoot() & "db/" & [_DBID_ XXXXXXXX] & "?a=API_GenAddRecordForm"

      & "&_fid_9="  &  [Sage - Date]
      & "&_fid_7="   &  [Sage - Revenue Credit]
      & "&_fid_6="  &  [Sage - Purchase Debit]
      & "&_fid_15=" &  URLEncode([Sage - Project Number])
      & "&_fid_13=" &  URLEncode([Sage - Vendor])
      & "&_fid_14="  & URLEncode([Sage - Vendor Invoice Number])
      & "&_fid_10=  &  URLEncode([Sage - PO Number])

       

      ... you are building a URL  string which needs to get through the internet. So if what you are putting into the string might have any spaces or any special characters like found on the top row of the keyboard then you need to wrap that field with URLEncode. 

      There are many ways to get the Field IDs for the fields  they will show if you right click on the field in the form or else look at the field list  

      Be sure that if you want to have the new record be a child of the inspection form then you need to populate the field for Related Inspection form in that URL formula button

       

      Feel free to post back with any questions.