Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Filemaker 7.0 "Insert Calculated result" Problem


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

Recommended Posts

Posted

I have a script where I am trying to enter these results...

Date > Date in Related Table

Name > Name in Same as above table

ID > ID in same as above table

All three related fields are visable on the screen which I am copying.

It will only enter the results if I have Script Debug ON. If I have SD off it only enters one of the results, the Date.

Any Ideas?

Posted

Hi Rikturscale,

Try setting the fields to script parameter values instead of relying on the relationship.

Hopefully, you're using a button to run the script. Just attach the required values as parameters to the button.

You can use GetAsText(related::date) & "|" & related::name & "|" & related::ID to seperate the three fields. When setting the field values in your script, you use the middle function to extract the portion of the parameter you need:

For date:

GetAsDate(Middle (Get(ScriptParameter), 1, Position(Get(ScriptParameter), "|", 1, 1) -1))

For Name:

Middle (Get(ScriptParameter), Position(Get(ScriptParameter), "|", 1, 2) + 1, Position(Get(ScriptParameter), "|", 1, 3) - Position(Get(ScriptParameter), "|", 1, 2) -1)

For ID:

Middle (Get(ScriptParameter), Position(Get(ScriptParameter), "|", 1, 2) + 1, Length(Get(ScriptParameter)) - Position(Get(ScriptParameter), "|", 1, 2))

If there's a possibility that your name or ID field will have "|" in it, change the separator to something else.

If you find that this doesn't work either, then there's probably something wrong with the relationship.

Hope this helps,

Cobra

Edit: Corrected the position functions within the last middle function.

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