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.

Featured Replies

Hello,

I am using Windows OS for my solution.  I have a layout in list view showing events. An admin user is to add groups of people as attendees of these events by pressing a button to run a script.  The script Freezes the window, changes layout, adds the attendees in the relevant table and returns the user to the original layout.

This all works well, except for when the script returns to the original layout and unfreezes the window, the scroll position of the active row (the record that the user is editing) jumps to the bottom of the screen.  I would like the scroll position to remain static or be returned to where it was before the script changes the layout - so a change is imperceptible to the user.

The Window Scroll options seem limited to top, bottom, pg up, pg down.  I have also tried having the script open a new window before changing the layout, but you then see the script working - if only briefly - as the new window comes to the front.

Has anybody got any suggestions on how I can return the scroll position to exactly where it was before the script executes?

Thanks in advance,

Ben

Edited by benmort81
clarity

Easiest would be to have the script not change layouts but open a new window, then change layout, do it's stuff, close window.  Another reason the position could be changing is if the script is changing the record in a way that it's changing the sort order.

I agree with Steve.

I like to include a few sub-scripts to my solutions that assist with this. In essence, they open/close process windows to do stuff in the background:

Process_Window_Open
------------------------------------
Allow User Abort
[ Off ]
Set Error Capture [ On ]
Set Variable [ $$p_window; Value: If(IsEmpty($p_window), 1, $p_window) ]
If [ Get(ActiveModifierKeys) = 1 ]
   New Window [ Style: Document; Name: "p" & $$p_window; Height: 300; Width: 300; Close: Yes; Minimize: Yes; Maximize: Yes; Zoom Control Area: Yes; Resize: Yes ]
Else
   New Window
[ Style: Document; Name: "p" & $$p_window; Height: 10; Width: 10; Top: Get(WindowDesktopHeight) + 50; Left: Get (WindowDesktopWidth) + 50; Close: Yes; Minimize: Yes; Maximize: Yes; Zoom Control Area: Yes; Resize: Yes ]
End If
Set Variable
[ $$p_window; Value:$$p_window + 1 ] 

-- This script allows for a window to pop open OFF SCREEN (or you can debug/view the window holding the SHIFT KEY) that is indexed (pX) to do background processing.

Process_Window_Close 
--------------------------------------

Allow User Abort [ Off ]
Set Error Capture [ On ]
If [ IsEmpty (Get(ScriptParameter) ) ]
   
Close Window [ Current Window ]
Else
   Close Window
[ Name: Get(ScriptParameter) ]
End If 

-- This script allows for you to close the current window or a targeted window via the Get(ScriptParameter) option.

Now you can use these sub-scripts when needed like the following example:

Allow User Abort [ Off ]
Set Error Capture [ On ]
Stuff
Stuff
Stuff
// Open first processing window = p1
Perform Script ["
Process_Window_Open"]
Stuff
Stuff
// Open second processing window = p2
Perform Script ["
Process_Window_Open"]
Stuff
Stuff
Stuff
Stuff
// Closes second processing window = p2

Perform Script ["Process_Window_Close, parameter ="p2""]
Stuff
Stuff
// Closes first processing window = p1
Perform Script ["
Process_Window_Close"]

Hope this helps!!!

This can also be done without opening any new windows; by using global selector fields and where necessary, relationship designed to allow record creation by using these global fields.

Perform Script on Server to create new record, sending necessary parameters. New windows on iOS and WebDirect, since they are single-window UIs, are to be avoided.

  • Author

Thanks all for the advice - I'll experiment with the techniques you have mentioned. 

  • Author
On 15/01/2016 at 8:01 PM, dwdata said:

I like to include a few sub-scripts to my solutions that assist with this. In essence, they open/close process windows to do stuff in the background:

Thanks for sharing these sub-scripts.  Using Windows OS, I still have the problem that the user's current screen is resized, albeit briefly whilst the new process window comes to the fore (off-screen).  I have worked around this by reducing the user's window by 4 points on layout enter.  It's not perfect, but it does not interrupt the work flow or lead to ugly jumping around, so that will have to do for now.

Thanks again.

Ben

 

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.