3 Images to parse from

As stated in the eariler question today.

I have a

EmptyBox Image
CheckMark Image
CheckNo Image

I create a image resource using Checkblank image - I then under source use the following code

@If(@UpperCase(Status)="YES";"chkyes"; @UpperCase(Status)="NO";"chkno";"chkblank")

I then have 4 Status fields

Status
StatusA
StatusB
StatusC

I have 4 approve or reject action buttons

[Approve]
@SetField("Status"; "YES");
FIELD ManDate := ManDate;
@SetField("ManDate"; @Today);
@Command([RefreshHideFormulas] );
@PostedCommand([FileSave])

[Reject]
@SetField("Status"; "NO");
FIELD ManDate := ManDate;
@SetField("ManDate"; @Today);
@Command([RefreshHideFormulas] );
@PostedCommand([FileSave])

There are 4 fields that have users names.  The images is a nice way to see who has approved or rejected.

This is working great now!  But I have created a new image called cirlce.gif

I would like when the first person approves it places a checkmark in the box (as it does now) but it will also go down one field below and change the box to a cirlce.  When that user clicks approve the circle changes to checkmark or X for reject.

I would seem that the last 3 fields image source would have to br modified to know if the image is a checkmark, X , emptybox, or cirlce.

How would you go about this?
JaziarAsked:
Who is Participating?
 
marilyngCommented:
Ok, best way is to create parallel computed for display fields for each status field.  These can be hidden at the top of the form, as long as you remember to set your status fields to refresh fields on change. ( I tested in a table with the pic fields in a column next to the status fields.)

So you have:

Status
StatusA
StatusB
StatusC

I have four computed for display fields: pic, picA, picB, picC.  (My "CANCEL" image is your "CIRCLE" image, so I have:
CHKYES, CHKNO, CHKNA, CANCEL.)

The picture formulas:
Statuspic = pic
STATUSApic = pica
STATUSBpic = picb
STATUSCpic = picc

pic formula:
F:=STATUS;
@If(F="YES";"CHKYES";F="NO";"CHKNO";"CHKNA")

pica:
S:=@IF(STATUS="YES";1;STATUS="NO";2;0);
SA:=@IF(STATUSA="YES";10;STATUSA="NO";20;0);
T:=S+SA;
@IF(T=1;"CANCEL";T>=10 & T<20;"CHKYES";T>=20;"CHKNO";"CHKNA")

picb:
S:=@IF(STATUSA="YES";1;STATUSA="NO";2;0);
SA:=@IF(STATUSB="YES";10;STATUSB="NO";20;0);
T:=S+SA;
@IF(T=1;"CANCEL";T>=10 & T<20;"CHKYES";T>=20;"CHKNO";"CHKNA")

picc:
S:=@IF(STATUSB="YES";1;STATUSB="NO";2;0);
SA:=@IF(STATUSC="YES";10;STATUSC="NO";20;0);
T:=S+SA;
@IF(T=1;"CANCEL";T>=10 & T<20;"CHKYES";T>=20;"CHKNO";"CHKNA")

Phew...!
0
 
JaziarAuthor Commented:
Nice work!  Thanks
0
 
marilyngCommented:
You're welcome!  don't forget to close this question when you've tested.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.