Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

modal window for data entry

Featured Replies

  • Newbies

Hello All,

 

This is my second post.

 

I'm currently playing with my sample file, which based on watching on youtube and reading forum posts. I have three text fields, and three global fields. I want to use a modal window for entering a new record. below are the scripts that I used based from what I read and watch.

 

Create Project script

 

Allow user abort [off]

New Window [Name: "New Project"; Height:1; Width:1; Style:Document]

Show/Hide Toolbars [Hide]

Go to Layout [New Project]

Adjust Window [Resize to Fit]

Perform Script ["Center Window"]

New record/Request

Pause/Resume Script[indefinitely]

Set Field [Modal window:: Project Name; Modal window::Project_Global]

Set Field [Modal window:: Project Contact; Modal window::Project Contact_Global]

Set Field [Modal window:: Project Notes; Modal window::Project Notes_Global]

If[$$delete=1]

Set Variable[$$delete; Value:""]

Delete Record/Request [No dialog]

End If

Close Window [Current Window]

 

Clean Global ( I used this for Script triggers OnLayoutExit for New Project Layout)

 

Set Field [Modal window::Project Name_Global; ""]

Set Field [Modal window::Project Contact_Global; ""]

Set Field [Modal window::Project Notes_Global; ""]

 

 

Cancel Project

 

Set Variable[$$delete; Value:1]

If[isEmpty(Modal window:: Project Name_Global) or (Modal window:: Project Name_Global) or (Modal window:: Project Contact _Global) or (Modal window:: Project Notes_Global)]

Show Custom Dialog [Get(ScriptName); "You are started entering data for new project cancel?"]

If[Get(LastMessageChoice)=2//No]

Exi Script[Result:False]

Else

Set Field [Modal window::Project Name_Global; ""]

Set Field [Modal window::Project Contact_Global; ""]

Set Field [Modal window::Project Notes_Global; ""]

End If

End If

 

Can you please help me to get the following

 

1. I want in my solution that if I Click the New Project Button my original layout will not not resize.

2. If I will Click my save button I want to see the record that I recently entered in browse mode.

3. If I click the cancel button and the custom dialog pop up, I want my new project window still open.

 

Please find attached sample file that Im working.

 

Any sample file  is highly appreciated.

 

Thank you so much,

Project.zip

For #1: do you start with the window maximized?  Your profile says you are on Windows; if you start with the window maximized and then spawn a new window, the original window will de-maximize.  That's a long-standing annoyance.

 

#2: you will have to do an explicit find in the original window for that new record.  Separate windows function more or less like two different user sessions; the first window will not inherit a found set from another window

 

#3: when the user cancels  you have to make sure the $$delete variable is not set to 1, you also have to signal to the paused script that it should not close the window (you may need to use a different value for the $$delete variable for this.

 

However you can make your live a lot easier by using real modal windows and not put the original script in pause mode.

  • Author
  • Newbies

Hello,

 

this is the modification that I made for to partially solved # 1

 

Create Project script

 

Allow user abort [off]

Go to Layout [Modal window]

Set Zoom Level [Lock; 100%]

New Window [Name: "New Project"; Height:1; Width:1; Style:Document]

Show/Hide Toolbars [Hide]

Go to Layout [New Project]

Set Zoom Level [Lock; 100%]

Adjust Window [Resize to Fit]

Move/Resize Window [Current Window; Top (Get(ScreenHeight)/2) - (Get(WindowHeight)/2); Left (Get(ScreenHeight)/2) - (Get(WindowHeight)/2)

New record/Request

Pause/Resume Script[indefinitely]

Set Field [Modal window:: Project Name; Modal window::Project_Global]

Set Field [Modal window:: Project Contact; Modal window::Project Contact_Global]

Set Field [Modal window:: Project Notes; Modal window::Project Notes_Global]

If[$$delete=1]

Set Variable[$$delete; Value:""]

Delete Record/Request [No dialog]

End If

Close Window [Current Window]

 

If somebody has a better one, I will appreciate it. Please help me also to have a solution for my #2  & #3 request.

Thank you so much.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.