1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Using the -1 in menu options for form...

Discussion in 'Community' started by cheyennemtnman, May 13, 2020.

  1. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    Works great but the user needs to come back and create a new record... without overwriting the data in the previous record... is there a way to do this? Have a button that saves and clears data to start a new record?
     
    Last edited: May 13, 2020
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    If the form menu should always create a new record don't set anything in the options, then it's just an "Add record".
     
    cheyennemtnman likes this.
  3. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    Well I just put in the -1 one in the menu options purposefully so the same form data comes up each time they log in since they are recording their data at each stage of the mask sewing process. After completing the sewing of all the masks components in the pack mailed to them They mail the completed pack back to us. They are ready to start another batch so they request another pack to be mailed to them. What I need is to save the first batch information when they have finished the last stage of the first batch and clear the form for them to enter the second batch information and then later a third batch information. There is a period of time between batches. They receive the sewing pack then they work on it then they mail it back... so there are three groups in the form to complete over a few days then they request a new sewing pack and start over... completing each stage Receive, Work and Return with data in each stage to submit.
    Now in some cases they receive multiple packs and I need them to be able to enter information back to back to back etc.
     
    Last edited: May 13, 2020
  4. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    So how can you save the record and start over with the new record... when they sign in next?
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    You mean:
    during one log-in time a user is allowed to add a record once and then to edit it.
    after log out and log in again he can add/edit a new one?
    In this case you must somehow use the session token...
     
    cheyennemtnman likes this.
  6. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    The sewer logs in and begins data entry when they receive their pack (shortages of materials, number of mask components received, damaged pieces, etc.) ... they then begin sewing... they will log out and come back in later to update their current pack record to include some data of start and stop times on the sewing of masks in the pack. This may happen over days... then when they complete the pack... they will mail the pack back and record when they mailed it and how many masks are in the pack...
    Once that it is mailed they indicate that they want another pack.. this is when I would like to save that record (1st pack) and create a new record for that user to begin the process again.. with Pack 2
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    So add a status element (with e.g. a status completed") and a list prefilter like WHERE status NOT EQUAL TO completed
     
    cheyennemtnman likes this.
  8. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    So You are suggesting a radio button with Options Work In Progress, Completed and Mailed then check for the option selected when the form is opened? IF "Mailed" then what happens to allow the sewer to create a new record? Not sure if I understand how that works with -1 in the form option
     
  9. troester

    troester Well-Known Member Staff Member

    Level: Community
    -1 is showing the (first) record belonging to the logged-in user (i.e. userID=your-userID-element set in "Key name") in your Fabrik list.
    It's respecting your list pre-filters.
    If there's no user record found the user gets the form for adding a record.

    So if you set a pre-filter only showing the "in progress" records (or whatever you set up) the user will get a new record if he doesn't have such a record (i.e. if his "old" record got an other status).
    It's up to you to set the status as you need.
     
    cheyennemtnman likes this.
  10. cheyennemtnman

    cheyennemtnman Member

    Level: Community
    Thank you! Attached is the form I have... there are three groups in the form So they have received, in progress and mailed are in the same form...
    As you see I have tours of duty 1 through 6 and the sewer selects... Ideally I would like one record per tour... Could I use this in the prefilter or just add a status field ? (Complete or in Progress)
     

    Attached Files:

Share This Page