May 1, 200619 yr 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.
May 2, 200619 yr 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
May 2, 200619 yr Case( Sortfield = LastName and SortDirection = "Ascending"; Pic2; Sortfield = LastName and SortDirection = "Descending"; Pic1; Pic3)
May 2, 200619 yr 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
Create an account or sign in to comment