Jump to content

Set Field [] vs. Insert Calculated Result


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

Recommended Posts

From Comment's post waaaay back in 2007:
 

I don't know why you bother with the times - Filemaker will do it for you*. Just enter the search criteria as a date range:

YourTable::YourStartDate & ".." & YourTable::YourEndDate

BTW, it's preferable to use Set Field[] instead of Insert Calculated Result. [my formatting]

-------------------------

Why is Set Field [] preferred? 

Link to comment
Share on other sites

28 minutes ago, WF7A said:

Why is Set Field [] preferred? 

Because Insert Calculated Result[] requires the target field to be present on the current layout, while Set Field[] works entirely at the data level. Therefore Insert Calculated Result[] is more suitable in situations where the script's purpose is to assist the user in data entry. In a situation like the one described in the linked thread, where user entry is (no longer) required, it is better to bypass the layout level and avoid the risk of breaking the script if the field is removed from the layout.

 

Edited by comment
  • Plus1 1
Link to comment
Share on other sites

10 hours ago, Ocean West said:

insert calculated result to a variable is still an option

I don't know if "still" is the right word to use here, since it is a relatively new option. I don't think it even existed back then.

But yes, if you use a variable as the target, then of course you're working at the data level. And then the comparison is to Set Variable[], not to Set Field[] as above. And if you also select the Select entire contents option, then those two are identical (at least conceptually, if not performance-wise).

 

 

Link to comment
Share on other sites

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