AnsweredAssumed Answered

Popovers and New/Existing Record Scripting

Question asked by lcot17 on Feb 26, 2016
Latest reply on Feb 27, 2016 by bigtom

Hi -


This is sort of an extension from (Create New 'Related' Record in Popover) but it has kind of transformed into a different question now after I have eventually made some progress.


I have attached a database I have quickly developed as a theory test. It is a Customer table/layout where I can create a log of all communications between myself and them. (Customer Log)


I have a set up at the moment where I have the following capability:

  1. Using Global Fields, I can create a new customer log record from a popover button.
  2. Using a button in the Customer Log portal, I can open that record in the same popover but on a different slide of a Slide Control object. Giving me 2 objects in the slide control ... 'New Log' and 'Existing Log'.


Problems with my database:

  1. Clicking 'ADD TO LOG' button should automatically go to the 'New Log' object and display blank fields ready for data entry.
    1. By creating a script trigger when the button is clicked, it removes the ability to open the popover to show existing records on slide 2 as it will always open on the 1st slide.
  2. I want to be able to have a 'cancel' button on each slide to cancel or confirm changes / fields.
    1. Add Log: Save button validates the data and closes the popover. Fine
    2. Add Log: Cancel button gives a 'warning' - option 2 means data entry continues and option 1 means the popover is closed and record deleted.
    3. Add Log: Clicking off the popover (closing) - Again, if data has started to be entered it prompts a warning message to either continue entry or close and delete the record.
    4. Existing Log: Making changes to a number of fields can all be reverted by clicking a 'Cancel' button or clicking off the popover and confirming a warning dialog
    5. Existing Log: Data is only committed when the 'Save' button is clicked (no dialog) and the popover closes.


My question is: How do I solve the above? Am I making life difficult for myself by merging 2 forms on popovers and slide control objects?

How do I avoid conflicts with script triggers here and action scripts?


Thank you in advance!