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.

new window IF existing called Invoice not present

Featured Replies

Hi,

Can someone help?

What is the script statement for doing this please:

if window "Invoice" is not present or closed,

New Window "Invoice", h, d, ph, pv

else goto window "Invoice"

end if

Thanks - I know it's got something to do with GetCurrentWindow or something but not sure what.

Also, how do you copy from a field in one window into another window's field? I understand that you could have two windows open and be on completely different records, that stirs up a little fear of pasting into the wrong record - 'spose I can get around that but, is that correct? If you were to simply create a script that pastes into a field on the other window, would it just paste the contents into whatever record is on display?

Cheers again

  • Author

I looked back at an old forum entry called "Window Control" and found that in a script step you cal do :

Select Window [Name "Invoice"]

but what happens if it doesn't exist at present? Will it automatically create one called "Invoice" or do I do an error capture if not present?

What would you do?

Also, any way of making the windows unmovable other than refreshing their location all the time? And unresizable - set to FIT and nothing but?

Any way of not having the big fat border all the way around the new window if you don't want?

These new points are not of paramount importance so I thought I'd tag them onto this post. If someone knows the answers though, it would be great to know

Thank you yet again guys and girls

If ( Position ( "P" & WindowNames & "P" ; "P" & "Invoice" & "P" ) )

# A window named Invoice already exists.

Select Window [ "Invoice" ]

Else

# Open new Invoice window.

New Window [ "Invoice" ]

Go to Layout [ "Invoice layout" ]

End If

  • Author

Respect! You're a star.

However, I have done a stupid stooooopid thing last night - absolute muppetary!

I created a startup script that was suppose to open a certain new window with a set of pixel parameters. Because there was a window that was open in the background, I asked the script to close it BEFORE opening the new one.

Now I cannot open my database because the first script step closes it - arrrrggghhhh!!!!!! what do I do? I've done loads since my last backup! What can I do, is there anyway of opening a database without the startup script trying to load up? Surely there has to be, that can't be it can it?

Please help!

Easy peasy.

Make a new file, no tables or fields. Define a new script, Perform Script step, select external from the list, then browse to your other file.

This illustrates how easy it is to bypasss non-native login systems that rely solely on scripts to limit user actions.

  • Author

I did this - thank God. I should have had my FM6 head on to do it! Simple really aye? So you're just over the ditch then - I've been living in New Zealand for the last 3 months - Southern Hemoshere rocks - especially now that we're just starting to get summer!

From UK to NZ, you probably haven't seen a *real* summer yet. wink.gif

Have you done the LOTR tour yet? LOL

  • Author

not yet - did a bit of the south island and bought the LOTR Locations book so that I know where I'm going. I will do it when I get a break - I'm working for the ANZ bank at the moment doing internal software support and writing bank branch LVR levelling tools and stuff - getting to know you! - must have seen the advert!

Summer, well - you've got it at the moment, we just get bursts of intense heat and sun days and tropical downpour the next day. Looking forward to a summer christmas - seems quite a weird notion!

Do you find there's a lot of FileMaker develpoment work over this side of the world, freelance?

Over in the UK, there was quite a bit - haven't tried to look over here, too busy doing other stuff and database projects assigned to me from UK.

Anywaty, thanks for your help - it's nice to know that someone is on the same time zone (nearly) as me!

Kind Regards,

Matt

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.