property FormatConditionalAppearance.ContextEditExpression as Boolean
Indicates whether the item of the current conditional-format object in the control's content menu displays/edits the conditional expression, at runtime.

TypeDescription
Boolean A Boolean expression that indicates whether the item of the current conditional-format object in the control's content menu displays/edits the conditional expression, at runtime.
By default, the ContextEditExpression property is False, so the format's expression is not editable at runtime. Use the ContextEditExpression property on True, to allow user to edit the format's Expression at runtime. The value keyword in the Expression property indicates the value/result to be evaluated. For instance, "value > 2000" indicates all values greater than 2000. While typing the FormatConditionalAppearance's Expression the item gets checked, and it shows as disabled if the Expression is not valid ( empty or syntactically incorrect ). The FormatConditionalAppearance format is not applied to any value, if not checked, or the expression is not valid ( empty or syntactically incorrect ) 

The following screen show shows the "custom" FormatConditionalAppearance object, that allows editing the Expression property:

The following samples shows how you can edit the conditional-expression at runtime:

VBA (MS Access, Excell...)

With Pivot1
	.BeginUpdate 
	.Import "C:\Program Files\Exontrol\ExPivot\Sample\data.txt"
	With .FormatConditionalAppearances.Add("custom","custom","")
		.Bold = True
		.FontSize = 12
		.Expression = "value > 2000"
		.ContextEditExpression = True
	End With
	.PivotRows = "0"
	.PivotColumns = "sum(5)[custom]/12"
	.EndUpdate 
End With

VB6

With Pivot1
	.BeginUpdate 
	.Import "C:\Program Files\Exontrol\ExPivot\Sample\data.txt"
	With .FormatConditionalAppearances.Add("custom","custom","")
		.Bold = True
		.FontSize = 12
		.Expression = "value > 2000"
		.ContextEditExpression = True
	End With
	.PivotRows = "0"
	.PivotColumns = "sum(5)[custom]/12"
	.EndUpdate 
End With

VB.NET

With Expivot1
	.BeginUpdate()
	.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
	With .FormatConditionalAppearances.Add("custom","custom","")
		.Bold = True
		.FontSize = 12
		.Expression = "value > 2000"
		.ContextEditExpression = True
	End With
	.PivotRows = "0"
	.PivotColumns = "sum(5)[custom]/12"
	.EndUpdate()
End With

VB.NET for /COM

With AxPivot1
	.BeginUpdate()
	.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
	With .FormatConditionalAppearances.Add("custom","custom","")
		.Bold = True
		.FontSize = 12
		.Expression = "value > 2000"
		.ContextEditExpression = True
	End With
	.PivotRows = "0"
	.PivotColumns = "sum(5)[custom]/12"
	.EndUpdate()
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPIVOTLib' for the library: 'ExPivot 1.0 Control Library'

	#import <ExPivot.dll>
	using namespace EXPIVOTLib;
*/
EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"custom","custom","");
	var_FormatConditionalAppearance->PutBold(VARIANT_TRUE);
	var_FormatConditionalAppearance->PutFontSize(12);
	var_FormatConditionalAppearance->PutExpression(L"value > 2000");
	var_FormatConditionalAppearance->PutContextEditExpression(VARIANT_TRUE);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[custom]/12");
spPivot1->EndUpdate();

C++ Builder

Pivot1->BeginUpdate();
Pivot1->Import(TVariant("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt"),TNoParam());
Expivotlib_tlb::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = Pivot1->FormatConditionalAppearances->Add(L"custom",TVariant("custom"),TVariant(""));
	var_FormatConditionalAppearance->Bold = true;
	var_FormatConditionalAppearance->FontSize = 12;
	var_FormatConditionalAppearance->Expression = L"value > 2000";
	var_FormatConditionalAppearance->ContextEditExpression = true;
Pivot1->PivotRows = L"0";
Pivot1->PivotColumns = L"sum(5)[custom]/12";
Pivot1->EndUpdate();

C#

expivot1.BeginUpdate();
expivot1.Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",null);
exontrol.EXPIVOTLib.FormatConditionalAppearance var_FormatConditionalAppearance = expivot1.FormatConditionalAppearances.Add("custom","custom","");
	var_FormatConditionalAppearance.Bold = true;
	var_FormatConditionalAppearance.FontSize = 12;
	var_FormatConditionalAppearance.Expression = "value > 2000";
	var_FormatConditionalAppearance.ContextEditExpression = true;
expivot1.PivotRows = "0";
expivot1.PivotColumns = "sum(5)[custom]/12";
expivot1.EndUpdate();

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:5C9DF3D3-81B1-42C4-BED6-658F17748686" id="Pivot1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Pivot1.BeginUpdate();
	Pivot1.Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",null);
	var var_FormatConditionalAppearance = Pivot1.FormatConditionalAppearances.Add("custom","custom","");
		var_FormatConditionalAppearance.Bold = true;
		var_FormatConditionalAppearance.FontSize = 12;
		var_FormatConditionalAppearance.Expression = "value > 2000";
		var_FormatConditionalAppearance.ContextEditExpression = true;
	Pivot1.PivotRows = "0";
	Pivot1.PivotColumns = "sum(5)[custom]/12";
	Pivot1.EndUpdate();
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:5C9DF3D3-81B1-42C4-BED6-658F17748686" id="Pivot1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Pivot1
		.BeginUpdate 
		.Import "C:\Program Files\Exontrol\ExPivot\Sample\data.txt"
		With .FormatConditionalAppearances.Add("custom","custom","")
			.Bold = True
			.FontSize = 12
			.Expression = "value > 2000"
			.ContextEditExpression = True
		End With
		.PivotRows = "0"
		.PivotColumns = "sum(5)[custom]/12"
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axPivot1.BeginUpdate();
axPivot1.Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",null);
EXPIVOTLib.FormatConditionalAppearance var_FormatConditionalAppearance = axPivot1.FormatConditionalAppearances.Add("custom","custom","");
	var_FormatConditionalAppearance.Bold = true;
	var_FormatConditionalAppearance.FontSize = 12;
	var_FormatConditionalAppearance.Expression = "value > 2000";
	var_FormatConditionalAppearance.ContextEditExpression = true;
axPivot1.PivotRows = "0";
axPivot1.PivotColumns = "sum(5)[custom]/12";
axPivot1.EndUpdate();

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_FormatConditionalAppearance;
	anytype var_FormatConditionalAppearance;
	;

	super();

	expivot1.BeginUpdate();
	expivot1.Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt");
	var_FormatConditionalAppearance = COM::createFromObject(expivot1.FormatConditionalAppearances()).Add("custom","custom",""); com_FormatConditionalAppearance = var_FormatConditionalAppearance;
		com_FormatConditionalAppearance.Bold(true);
		com_FormatConditionalAppearance.FontSize(12);
		com_FormatConditionalAppearance.Expression("value > 2000");
		com_FormatConditionalAppearance.ContextEditExpression(true);
	expivot1.PivotRows("0");
	expivot1.PivotColumns("sum(5)[custom]/12");
	expivot1.EndUpdate();
}

Delphi 8 (.NET only)

with AxPivot1 do
begin
	BeginUpdate();
	Import('C:\Program Files\Exontrol\ExPivot\Sample\data.txt',Nil);
	with FormatConditionalAppearances.Add('custom','custom','') do
	begin
		Bold := True;
		FontSize := 12;
		Expression := 'value > 2000';
		ContextEditExpression := True;
	end;
	PivotRows := '0';
	PivotColumns := 'sum(5)[custom]/12';
	EndUpdate();
end

Delphi (standard)

with Pivot1 do
begin
	BeginUpdate();
	Import('C:\Program Files\Exontrol\ExPivot\Sample\data.txt',Null);
	with FormatConditionalAppearances.Add('custom','custom','') do
	begin
		Bold := True;
		FontSize := 12;
		Expression := 'value > 2000';
		ContextEditExpression := True;
	end;
	PivotRows := '0';
	PivotColumns := 'sum(5)[custom]/12';
	EndUpdate();
end

VFP

with thisform.Pivot1
	.BeginUpdate
	.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
	with .FormatConditionalAppearances.Add("custom","custom","")
		.Bold = .T.
		.FontSize = 12
		.Expression = "value > 2000"
		.ContextEditExpression = .T.
	endwith
	.PivotRows = "0"
	.PivotColumns = "sum(5)[custom]/12"
	.EndUpdate
endwith

dBASE Plus

local oPivot,var_FormatConditionalAppearance

oPivot = form.EXPIVOTACTIVEXCONTROL1.nativeObject
oPivot.BeginUpdate()
oPivot.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
var_FormatConditionalAppearance = oPivot.FormatConditionalAppearances.Add("custom","custom","")
	var_FormatConditionalAppearance.Bold = true
	var_FormatConditionalAppearance.FontSize = 12
	var_FormatConditionalAppearance.Expression = "value > 2000"
	var_FormatConditionalAppearance.ContextEditExpression = true
oPivot.PivotRows = "0"
oPivot.PivotColumns = "sum(5)[custom]/12"
oPivot.EndUpdate()

XBasic (Alpha Five)

Dim oPivot as P
Dim var_FormatConditionalAppearance as P

oPivot = topparent:CONTROL_ACTIVEX1.activex
oPivot.BeginUpdate()
oPivot.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
var_FormatConditionalAppearance = oPivot.FormatConditionalAppearances.Add("custom","custom","")
	var_FormatConditionalAppearance.Bold = .t.
	var_FormatConditionalAppearance.FontSize = 12
	var_FormatConditionalAppearance.Expression = "value > 2000"
	var_FormatConditionalAppearance.ContextEditExpression = .t.
oPivot.PivotRows = "0"
oPivot.PivotColumns = "sum(5)[custom]/12"
oPivot.EndUpdate()

Visual Objects

local var_FormatConditionalAppearance as IFormatConditionalAppearance

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt",nil)
var_FormatConditionalAppearance := oDCOCX_Exontrol1:FormatConditionalAppearances:Add("custom","custom","")
	var_FormatConditionalAppearance:Bold := true
	var_FormatConditionalAppearance:FontSize := 12
	var_FormatConditionalAppearance:Expression := "value > 2000"
	var_FormatConditionalAppearance:ContextEditExpression := true
oDCOCX_Exontrol1:PivotRows := "0"
oDCOCX_Exontrol1:PivotColumns := "sum(5)[custom]/12"
oDCOCX_Exontrol1:EndUpdate()

PowerBuilder

OleObject oPivot,var_FormatConditionalAppearance

oPivot = ole_1.Object
oPivot.BeginUpdate()
oPivot.Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
var_FormatConditionalAppearance = oPivot.FormatConditionalAppearances.Add("custom","custom","")
	var_FormatConditionalAppearance.Bold = true
	var_FormatConditionalAppearance.FontSize = 12
	var_FormatConditionalAppearance.Expression = "value > 2000"
	var_FormatConditionalAppearance.ContextEditExpression = true
oPivot.PivotRows = "0"
oPivot.PivotColumns = "sum(5)[custom]/12"
oPivot.EndUpdate()

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Get ComImport "C:\Program Files\Exontrol\ExPivot\Sample\data.txt" Nothing to Nothing
	Variant voFormatConditionalAppearances
	Get ComFormatConditionalAppearances to voFormatConditionalAppearances
	Handle hoFormatConditionalAppearances
	Get Create (RefClass(cComFormatConditionalAppearances)) to hoFormatConditionalAppearances
	Set pvComObject of hoFormatConditionalAppearances to voFormatConditionalAppearances
		Variant voFormatConditionalAppearance
		Get ComAdd of hoFormatConditionalAppearances "custom" "custom" "" to voFormatConditionalAppearance
		Handle hoFormatConditionalAppearance
		Get Create (RefClass(cComFormatConditionalAppearance)) to hoFormatConditionalAppearance
		Set pvComObject of hoFormatConditionalAppearance to voFormatConditionalAppearance
			Set ComBold of hoFormatConditionalAppearance to True
			Set ComFontSize of hoFormatConditionalAppearance to 12
			Set ComExpression of hoFormatConditionalAppearance to "value > 2000"
			Set ComContextEditExpression of hoFormatConditionalAppearance to True
		Send Destroy to hoFormatConditionalAppearance
	Send Destroy to hoFormatConditionalAppearances
	Set ComPivotRows to "0"
	Set ComPivotColumns to "sum(5)[custom]/12"
	Send ComEndUpdate
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oFormatConditionalAppearance
	LOCAL oPivot

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPivot := XbpActiveXControl():new( oForm:drawingArea )
	oPivot:CLSID  := "Exontrol.Pivot.1" /*{5C9DF3D3-81B1-42C4-BED6-658F17748686}*/
	oPivot:create(,, {10,60},{610,370} )

		oPivot:BeginUpdate()
		oPivot:Import("C:\Program Files\Exontrol\ExPivot\Sample\data.txt")
		oFormatConditionalAppearance := oPivot:FormatConditionalAppearances():Add("custom","custom","")
			oFormatConditionalAppearance:Bold := .T.
			oFormatConditionalAppearance:FontSize := 12
			oFormatConditionalAppearance:Expression := "value > 2000"
			oFormatConditionalAppearance:ContextEditExpression := .T.
		oPivot:PivotRows := "0"
		oPivot:PivotColumns := "sum(5)[custom]/12"
		oPivot:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN