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

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

Recommended Posts

Posted

Hello All!

I'm building a Field Autoenter that uses Evaluate and a custom Function to update. I have a field for Priority for each phone number I store in my database. Sometimes a client will want a mobile phone to be called first. I would like the person working on the file to set that phone numbers priority to 1. Using Evaluate, I have listed all of the evaluate fields to update when any of them change. If mobile phone was 2, and I change it to 1, I want all of the fields to recheck their own priority again. The number that was previosly 1, will goto 2, and the rest of the prioritys will move up if there is a spot open.

Here is the Custom Fuction that I'm currently using:

//Name PriorityFindLowest

//Parameters Number 1 Number 2 Number 3 Number 4 Number 5

Evaluate (

Case (

Number 1 ≠ 1 and Number 2 ≠ 1 and Number 3 ≠ 1 and Number 4 ≠ 1 and Number 5 ≠ 1; 1;

Number 1 ≠ 2 and Number 2 ≠ 2 and Number 3 ≠ 2 and Number 4 ≠ 2 and Number 5 ≠ 2; 2;

Number 1 ≠ 3 and Number 2 ≠ 3 and Number 3 ≠ 3 and Number 4 ≠ 3 and Number 5 ≠ 3; 3;

Number 1 ≠ 4 and Number 2 ≠ 4 and Number 3 ≠ 4 and Number 4 ≠ 4 and Number 5 ≠ 4; 4;

Number 1 ≠ 5 and Number 2 ≠ 5 and Number 3 ≠ 5 and Number 4 ≠ 5 and Number 5 ≠ 5; 5;

6

)

)

Here is the Autoenter Date for the zMobile Phone Number Priority.

Evaluate ( Case ( IsEmpty ( Mobile Phone ); "";

PriorityFindLowest (zMobile Phone Number Priority; zBusiness Number 1 Priority; zBusiness Number 2 Priority; zFax Number Priority;zHome Phone Priority; zBusiness Fax Number 1 Priority))

; [zBusiness Fax Number 1 Priority;zBusiness Number 1 Priority;zBusiness Number 2 Priority;zFax Number Priority;zHome Phone Priority;zMobile Phone Number Priority])

The first test I did on this, I had the field priority that I changed as the last parameter listed for "PriorityFindLowest." With it set this way, some of the fields would update and work perfectly. Some of the fields would not change. I would set it to 1, and when it re-evaluated it would change it back to it's previous priority.

The way it is set now, with the current field being changed, it is the first parameter, it doesn't work at all anymore.

Anybody see what I'm doing wrong here?

Thanks!

Munchieman

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