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

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

Recommended Posts

Posted

I have this script that I built in FM Dev 6. This script is put on a calculation field that is a container.

Case( PatternCount( SortField, "LastName¶" ),

GetRepetition( SortPicture,

If( MiddleWords( SortDirection,

PatternCount( Left( SortField, Position( SortField, "LastName", 1, 1 ) ), "¶" ) + 1, 1 ) = "Ascending", 1, 2 ) ) )

Basically what I need is,

If SortField = LastName then

If the SortDirection = "Ascending" then put in the 2nd picture from the SortPicture container.

If the SortDirection = "Descending" then put in the 1st picture from the SortPicture container.

The default picture has to be the 3rd picture from the SortPicture container.

Posted

Not certain of your syntax overall, but I'd do it like this in pseudo-code:

If (PatternCount(SortField, "LastName¶" );

If (SortDirection = Ascending; Pic2; Pic1);

Pic3

);

I think it's simpler.

David

Posted

Case(

Sortfield = LastName and SortDirection = "Ascending"; Pic2;

Sortfield = LastName and SortDirection = "Descending"; Pic1;

Pic3)

Posted

But it should be

GetRepetition ( Pics ; Case(

Sortfield = LastName and SortDirection = "Ascending"; 2;

Sortfield = LastName and SortDirection = "Descending"; 1;

3))

With the pre fm7 syntax... Because it can't be stressed strongly enough, this is where repeating fields really come in handy and is a "legitimate" use of this field type - Since this is far from 1NF violations.

--sd

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