"Mere color, unspoiled by meaning, and unallied with definite form, can speak in thousand different ways." -- Oscar Wilde
Status bar is a common feature in siebel where color encoding depicts the status of record. I recently encountered similar scenario where i had to display different coloured text based on certain conditions on Form Applet. Browser script clicked me first. But finally this was achieved using configuration. As i struggle to achieve similar result in List applet we will discuss how on Form applet desired could be done. Lets take Service Request entity as an example (offlately this is becoming my favourite entity).
Problem Statement: If SR has some related SR then it should display some text in Red else alternate text in green.
Solution:
a) Go to SR buscomp. Create following fields
Name: PastSRRed
Calculated: True
Calculated Value: "< font color='red' > "+"This SR has related SR." +"< font > "
Name: PastSRGreen
Calculated: True
Calculated Value: "< font color='green' > " +"No related SR found" +"< font > "
Name: PastSRDisplay
Calculated: True
Calculated Value: IIF(Count("SR") > 0,[PastSRRed],[PastSRGreen]) // In this SR is the name of multivalue link between SR and related SR bc.
b) Go to SR form applet, where text needs to be displayed. Create following control.
Name: PastSRDisplay
Field: PastSRDisplay
DisplayName: PastStatus
HTML Display Mode: DontEncodeData
Compile BC/applet and lookout for changes. But to fetch this on list applet is still mystery for me. Any thought on list applet will be of great help.
Happy Coloring !!
אין תגובות:
הוסף רשומת תגובה