Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Goto Field Command


Bobg
 Share

Recommended Posts

I've set up a script trigger in a portal. When the user enters a SoldDate I instruct them to also fill out the SoldPrice. Then I execute Goto Field[soldPrice] but the cursor does not go to the SoldPrice Field. The message works and the trigger works on leaving the SoldDate field. Is Goto Field not the correct command?

 

Thanks

Bob Green

Link to comment
Share on other sites

Sure, Techphan.

 

The trigger script is as follows:

 

If[Case(line Items::Date Sold "" and Line Items:: Sold Price="";1=1)]

Beep

Show Dialog ["Please enter the Sales Price"]

Go to Field[select/perform]

End If

Link to comment
Share on other sites

I think your script is pausing on the "Show Dialog" step. Move the "Go to Field" step ahead and see if that works.

 

Like this:

 

If[Case(line Items:ate Sold "" and Line Items:: Sold Price="";1=1)]

...Beep

...Go to Field[select/perform]

...Show Dialog ["Please enter the Sales Price"]

End If

 

 

EDIT: Make sure you have a field specified in the "Go to Field" step. There does not appear to be so in what you posted.

Link to comment
Share on other sites

Moving the Go To Field ahead of the Show Dialog does not help. Placing the field name in the Go to field doesn't help.

Removing the Show dialog and the beep doesn't help. There are 2 calculated field that are recalculating at that moment but I can't see why that would screw things up. Any other ideas Techphan? I'm getting desperate now!

 

Thanks

Bob Green

Link to comment
Share on other sites

OK, two more things (well, really three):

 

1) What kind of field is this? The one thing it cannot be is calculated field by definition, but it can be a text or numeric field with a calculated value.

 

2) Can you enter into the field in browse mode? Right-click (Windows or Mac with PC mouse) or ctrl-left click (Mac) and get make sure there the box is checked to "Allow entry in Browse Mode."

 

Item #3 is to upload your application to this thread (but you would have to upgrade your membership in order to do so - hopefully we can get done before step 3).

Link to comment
Share on other sites

Two things:

 

1. Try adding this step at the end of your script:

 

Exit Script[0]

 

This is a good idea for most script trigger scripts, as it tells FileMaker to ignore the original keystroke that executed the script (tab). I suspect this is what's causing your focus to change (probably to the next field).

 

 

2. The choice of trigger (On Exit, On Save) makes a difference in how you exit a field. Trying other options could solve the issue.

Link to comment
Share on other sites

Moving the Go To Field ahead of the Show Dialog does not help. Placing the field name in the Go to field doesn't help.

Removing the Show dialog and the beep doesn't help. There are 2 calculated field that are recalculating at that moment but I can't see why that would screw things up. Any other ideas Techphan? I'm getting desperate now!

 

Thanks

Bob Green

 

1) And if your are still working on this, try naming the object and substitute "Go to Object [ObjectName]" in place of the "Go to Field []" step.

 

2) I don't know if "Go to Object []" was available in FMv8.5, so if it is not, then leave script "as is" but add this step immediately before "Go to Field []."

 

Add ---> "Go to Portal []"

Link to comment
Share on other sites

Version 8.5 had Go to Object. "Objects" were introduced in that very version along with web viewers which were the first layout items that could contain data but which could ONLY be identified as "objects".

Link to comment
Share on other sites

Hello Alan,

 

It's been 3 years since since you dropped into one of my threads. Not because you've been avoiding me

but because I haven't been doing any Filemaker work therefore no threads. I was in New york City last

month doing a video for a good client. Actually it was a five state shoot up and down the East coast from

Massachusetts to South Carolina.

On another subject, my son has started a new business in Tampa and has asked me for a simple database

which I've been working on for about two weeks. Hope everything is going well for you. Sorry, I know you big

city folks are not chatty so I'll get right to business.

I'm working in Filemaker 10 on the Mac. Everyone's suggestions above have not worked and I'm not exactly

sure I understand what you are saying. Do your statements above are talking about Version 8.5. Does this apply

to Version 10 and what might I be able to do to solve this problem.

Also I've just run into another problem. I am trying to place a number on a screen that represents the number

of line items in the portal that have sold. I've created a new field called TotalCountofSales. It's a calculated field

that is trying to determine how many Line Items have sold. To determine this I have to check all SoldDates fields

in the portal and count the ones that have been populated with SoldDates. I see that functions like Count are not

allowed in the calculation. What is the easiest way to accomplish this?

 

Thanks for your help

Bob Green

Link to comment
Share on other sites

Hi! :)

 

a) Create a calculation field in the PORTAL table, first; let's call it OneIfSold, defined as Case ( not IsEmpty (SoldDate); 1)

 

 

b) Now define TotalCountofSales as Sum (PortalTable::OneIfSold)

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use