I do not have time at this point to download an examine your file. (And I am reluctant to examine shared files unless a "road map" to the particular layout and scripts is provided anyway..)
But a common issue with popovers is when Go to Object is used in an attempt to open a popover so that clicking a button other than the popover button can open that popover. This works, but you have to give the popover Frame, not the popover button, an object name and then your button or script uses go to object to specify the object name of the Frame instead of the button.
Thank you for your reply. I followed your suggestion now, my popover is appearing. can you also help me with my other problem. If I will create a new record using the popover, if I will Click my Add Material button the previous material that I add is still there, how can I remove my previous entry.
The Script that Im using is
Go to Object[Object Name: "Add Material"]
Set Variable [$$scriptTrigger_off; Value:1]
Set Field[ Products::Material_lot no.]
Commit Records/Request[ ]
Your SEt field steps do not do anything in this script as they are missing the calculated result parameter.
When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.
That was just the most obvious thing wrong with your script. Taking an actual look at your file, this script appears to be one you want to use for adding a new record to the Products table. The set field steps do not appear to be needed at all as New Record/Request should create a new blank record in the products table.
I would appear that your script should be:
- Set Variable [ $$ScriptTrigger_off; Value:1 ]
- New Record/Request
- Go to Object [ Object Name: "Add Material" ]
- Set Variable [ $$ScriptTrigger_off; Value:"" ]
Both New Record/Request and Commit Records will close the popover. Commit Records is not needed in this script.
Thank you so much. I got it.
One more question, how can I avoid a popover from closing when clicking outside the panel. I want that If I accidentally click outside the popover it will warn me, so that the data that I entered will not lost.
Thank you so much.
Did you consider to use a modal window to achieve this?
You want the popover to not do what it was specifically designed to do--close when the user clicks the layout background.
Like Hbrendel, I would not use a popover for this if that behavior is undesirable. You can open a new modal window for collecting the user input.
But I have seen posts where others have scripted things to keep the popover open.