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

Insert Calculated Result Brings Error


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

Recommended Posts

Posted

Hi,

I have a script which loops through all the portals and inserts a calcultated result if the rel files date = todays date. When performing, it will not get off the first portal and go to the next, however if I replace the "insert cal result" with say "set field" or anything else it will work. Can anyone please help me out with this. The script is:

code:


Go to Portal Row (first)

Loop

If("RelFile:date = Today")

Here is the problem, why? - Insert Calculated Result...

End If

Go to Portal Row (exit after last, next)

End Loop.

The "If" is fine so it must be the "Insert Cal", but why, Any ideas? Thanks in advance for any help.

Posted

Two suggestions:

Rather than "Today", use "Status(CurrentDate)"

or (or maybe "and")...

Go to the related file and perform the script directly on the records there (you might have to perform a find first).

Posted

You could add a calculation field in the related file.

If(Date = Status(CurrentDate),"This text","Some other text")

Downside is would need to be unstored.

Saves a lot of loop scripting. Especially if multi user and someone is editing that related record.

Posted

Wait a minute!

You're saying that using the "Set Field" command works ... um ... well ... why not just use the "Set Field" command? It's more stable anyway, and just as flexible.

I like simple solutions, I do.

Posted

When more than one portal is on a layout, it's a good idea to use

Go to Field(a field::in the target portal)

before

Go to Portal Row ()

Posted

Is the field that the Insert Calculated Result is trying to insert data into on the layout? It needs to be. Set Field doesn't have this restriction.

Chuck

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