Jump to content
Server Maintenance This Week. ×

Fields, buttons and events


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

Recommended Posts

i'm an experienced lotus domino developer but new to filemaker for a small project...

i want to generate a "work log" within a field, displaying what has been done with an issue, in my old world i would say something like

txtHistory=txtHistory+txtLatestUpdate

with an allowance for carriage returns etc.

i'm unfamiliar with the Calculation feature of fields within fm, and everytime i reference the field i'm within it gives me a circular reference error. do i need a temp field or something similar?

when does a calculated field get calculated - at read of record, or edit of record, or on change of data (which data?) or on close of document or some other times???

can i kick off scripts automatically based on a user entering or exiting fields?

additionally what's the equivalent of the Inputbox, or the ability to create custom dialog boxes (if possible??)

any help appreciated before i lose my final bits of hair?

Link to comment
Share on other sites

I don't quite follow your specific problem, but here are some answers for your general questions:

jon2004 said:

i'm unfamiliar with the Calculation feature of fields within fm, and everytime i reference the field i'm within it gives me a circular reference error. do i need a temp field or something similar?

In general, as you've found, you can't have a field calculate itself. You need to make a second field that calculates your original field (input field) into the shape you need. You can display them side by side, only display the calculation field for reports etc., or whatever you need.

when does a calculated field get calculated - at read of record, or edit of record, or on change of data (which data?) or on close of document or some other times???

It calculates as soon as the field(s) it is based on change. If you enter data into the input field, the calculation field will change as soon as you exit the input field.

can i kick off scripts automatically based on a user entering or exiting fields?

This is high on the FM wishlist. Currently, no. But a lot of people have made workarounds that can simulate this behavior, depending on what you need to happen.

additionally what's the equivalent of the Inputbox, or the ability to create custom dialog boxes (if possible??)

There is a custom dialog box script step, if that's what you mean. If certain conditions are met, a box displays with clickable options & custom text.

Steve Brown

Link to comment
Share on other sites

>when does a calculated field get calculated?

a stored (indexed) field is recalculated when any of the referenced field changes.

an unstored field is calculated

1) when it's content is displayed

2) when any of the referenced field changes and it is currently displayed.

pay attention if you use Status() functions inside a stored field. It is not recalculated when the result of Status functions changes.

if you use the Today function in stored field every record is recalculated when opening the database file.

>everytime i reference the field i'm within it gives me a circular reference error

it's quite obvious, isn't it? what are you trying to do?

>can i kick off scripts automatically based on a user entering or exiting fields?

no. thare are workarounds but they have a lot of restrictions.

you have to design your solution in a way you don't need triggers.

for example: you need to trigger a script when theField gets changed.

instead of putting theField on the layout create a global variable called

gTheField.

Place gTheField on the layout. Then create a button labeled "Set", or "Ok" or whatever to perform a script that copies gTheField inside theField and then calls the trigger script.

It's like when you write some text in your web browser and then click "submit"

Link to comment
Share on other sites

This topic is 7392 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.