?
Solved

3 Images to parse from

Posted on 2006-03-21
3
Medium Priority
?
161 Views
Last Modified: 2013-12-18
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?
0
Comment
Question by:Jaziar
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
marilyng earned 500 total points
ID: 16254354
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
 

Author Comment

by:Jaziar
ID: 16257481
Nice work!  Thanks
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16259683
You're welcome!  don't forget to close this question when you've tested.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question