Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4739 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Not sure where to post. I have attached file of example.

On a related Quotes layout (related to Persons) I have calculation from Persons which creates an address label. I put this label everywhere, makes it easier than individual fields. Space is tight on my forms so I only want to show this single calculation. But I would like something strange, no surprise, right?

If someone clicks onto this calculation in pink, depending upon where their blinker lands, I want to put real fields underneath the calc and, if they click, let them enter the real field under it. Of course the calc does not line up exactly with the fields if you look at city state and zip.

I realize I could put Edit button but I want to try this first. Can a trigger tell where it lands and then go to a field underneath depending upon where it lands? In example I put the real fields to the right but I want them hidden under it. I want someone to be able to edit the real fields.

I tend to think things are impossible but I have been proven wrong so many times that I no longer believe it.

test Address.zip

Posted

I did this as an experiment. I don't think it would be a good idea in practice - because as you say, the fields will never align exactly and the user experience will be jarring. I would rather pop up a small window with all of the fields.

ClickedHere.zip

Posted

Hi Comment,

Thank you for taking a look. The other problem is if the second addess line is empty, it slides. How would I know which field to go to depending upon the line?

I did not consider a window and that is good idea. Will that work cross platform okay? I am on windows right now and I have noticed that windows is weird on making windows. Never scripted (modal?) window but I think I can figure it out. How do I make it stay until person is done making changes? Trigger? It is time I learn it anyway.

Posted

How would I know which field to go to depending upon the line?

It's just a matter of smartening up the calculation (which I am not going to do...). After all, we have access to the real data, so we know what is on which line. We also know the exact content of each field, so counting the words (or characters) in addition to (or instead of) lines could pinpoint the clicked position even further.

I believe on Windows you need to avoid maximizing the current window, if you want to pop up a new one. The pop-up will be pseudo-modal as long as a script is in process.

Posted

You'll want to have a script that opens the window and pauses, with a button on the new window layout set to resume after the edits have been made. That will keep the window front and focussed. I am on windows also. When a new window opens in windows the main window reduces, which is rather ugly. I tend to put a window resize maximum after closing the new window so the main window returns to max. Of course that may not always be desired but it works for me.

Posted

You are not going to smarten the calc because it is not the right way to go. But that script is kinda cool so I will study that too.

Even if we figured out how to make it work, as you say the person will see a jump as it attempts to go to the field which can never line up because fields do not move. I found some links to selection windows. Luckily nothing is maximised in this design. I will use window idea. Again thank you for your time, Comment.

Posted

Well I think I did it right. It was really easy (too easy?). Script was

New window

go to layout [address popup based upon People table]

Adjust window [resize to fit]

pause/resume indefinitely

close window

then the button to close the mini window is step "resume script". It seems to lock fine so unless you all tell me of a problem or a better way, I can move on. Thank you both for directing me the right way. Ron, I did not know about resume although when Comment said 'continue the script' I knew I had seen it. But never used it and did not know about connecting it to a button in that way. Slick. I suppose this is the only purpose of Resume? I can't think of anything else it would be good for.

I must confess, it seems there is something magical when the computer does what I tell it to do and I can watch it acting on my commands. It makes me feel like :super:

I do not get to feel that way very often. When my brain finally stops hurting from studying this stuff, I realize it can be fun even when it starts making semi-sense.

Posted

That is so funny. I just finished having a conversation with a coworker about the joys of programming and database development. How awsome it is to be able to write a set of instructions for the computer to follow in reguards to how to manipulate the input it recieves. I was descibing the joy and satisfaction of working on a particularly difficult process and then running that final test and getting the result I was looking for. I have been known to litterally jump out of my seat and yell out "Yes!!!". I have even been known to do a little happy dance. Of course the others in the office having no clue what i'm doing all think I'm nuts by now :)

If your main window reducing is a problem you can always ad

Adjust Window [Maximise]

at the end of the script to resize the main window.

Posted (edited)

And by that theory, Mr. Comment should be the happiest person on the planet. I wonder if there is a connection between how many posts he has and how much he knows? He said he learns from us all and I confess that I laughed out loud, doubting he really meant it. not that I was suggesting he was lying or anything.

But just the excitment of discovery and learning it is better than ... well, many (and many more) things. And the more I read of others problems and mistakes and how they are fixed, the more I like it. Oh dear. Do you think I might reach a point where I would rather study this stuff than play golf?

Nah. Not yet anyway.

I added a sentence in first paragraph

Edited by David Nelson
Posted

Well, you are getting a bit off-top, David, but since it is your thread, I think you have the right, LOL! So I feel comfortable off-topic as well. In fact, I pretty-much live and breathe off-topic.

This is the power of these forums and how we all learn here; whether I post a question or answer a post or simply read a thread and then create a test file and work through the answers, every piece builds my knowledge. Other people's problems are like daily pop-quiz! And yes, it can be extremely fun! I like your humor. :laugh:

Posted

Oh you are funny, LaRetta. Well if it helps me be good a developer as you and Comment then I am game.

Now, I have a pop quiz then for all of you

I put the script above and it works great. But as Vaughan said, if window is maximised then my little window becomes a blast of adjusting windows (back windows drop out of maximize). It looks horrid. I do not use maximize. I am Mac person. But I must plan for this and stop this ugly behavior.

I want to ask what is current state of window when script starts - is it maximised or not. Then when script ends, I can return the window maximised if it was. I have got through the Git functions, window state, restore, nothing fits.

I need Get(WindowsCondition)="Maximised", right?

Posted

Look on Brian Dunnings custom function web site for Kevin Frank's "WinMaximized". It's really a simple calculation and strictly doesn't NEED to be a CF (no recursion) but being one makes it easier to call.

http://www.briandunning.com/cf/1061

Posted

I would think that for most applications the document window would usually be maximized during normal operation. I know there are some solutions that may use multiple windows, maybe two side by side or something. Keep in mind that we are talking about the document window within the Filemaker window, so maximizing the document window does not maximize the FileMaker window. In other words, a user can run FileMaker in a reduced window, but how often would the user want to work with the document window reduced within the FileMaker window? So for me Maximizing the main document window makes sence.

That being said, the custom function Vaughan reffers to is a great find. I wonder though if there is a step further and rather than just determining if the window is maximized, can we actually record it's size and position before openning the new window and thus be able to return it to it's previous state after the window is closed?

Posted

My suggestion is to never maximize a window, but rather Resize to Fit. This avoids the Windows resizing issue.

Also, for modal popup windows, don't forget the Allow User to Abort (off).

@LaRetta - Yep, daily quiz.

@Ron - I still remember the triumph of my first successful looping script. Now that's power!

Posted

I still remember the triumph of my first successful looping script. Now that's power!

You keep going on about that. :D

(Loop joke, geddit.)

Posted

Thank you, bcooney for the Allow Abort part. I have been reading posts here for several months now and this is the first time I have seen Allow User Abort used. I shall search and study it. Help shows this script:

Allow User Abort[Off]

Go to Record/Request/Page[First]

Loop

If[isEmpty(Table1::clientNumberField)]

Speak["Client number is missing"]

Pause/Resume Script [indefinitely]

End If

Go to Record/Request/Page [Exit after last; Next]

End Loop

Allow User Abort[On]

Why set Allow User Abort back to ON when the script ends? It says it is always normally on and help even says, "FileMaker Pro automatically turns Allow User Abort on after the script finishes running."

Since this step keeps people from stopping a script, shouldn't it always be set to off at the beginning of every script? Otherwise someone can stop it in the wrong place. Very bad. I use error checking so I do not want people stopping any script I build. What am I missing here and why isn't it used more often?

Anyway, I'm off to try out a new script I am writing then I will study this abort issue. I dislike surprises. Yep, I get daily quiz with this stuff also. Every time I open FM Forums and read anything, it is a quiz for me.

You all are so very nice here. And your knowledge is amazing. Thank you for your assistance, knowledge and humour.

What the heck is Speak? Was that an old command?

Posted

Speak is aMac-only step that literally speaks the text. Macs have had text-to-speach capabilities for decades.

As to the last AUB [on] step -- no idea. Not necessary IMHO.

Posted

Hey Vaughan,

Unfortunately, Apple / Lion has messed this feature up in Safari. Safari no longer allows you to speak selected text, and it wants to start at the top of the page instead of in the Reply box that you're working in.

Lee

This topic is 4739 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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