Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetAll(
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00928699
Message ID:
00928709
Views:
20
Terry,

What's AP_FACTOR factor? If it's #DEFINE constant than it'll not be evaluated in the string literal enclosed in the single or double quotes. Use square brackets to get it evaluated.
.SetAll( "DynamicBackColor", [IIF( AP_FACTOR > 0, RGB( 0, 0, 255), RGB( 255, 255, 255))], "Column")
>Can anyone tell me what's wrong with the following "SetAll( "Dynamic.."..." call?
>
>While setting the values - no problem. It's only on .refresh() of the grid, or when I click somewhere in the form that I get the error:
>
>"Expression is invalid.  Use a valid expression for Dynamic..."
>
>and I get it at least twice for each.
>
>Select CENZNFLD		
>If SEEK( lnCompID)
>    Scan While AP_ID 	= lnAPID ;
>         And   AP_FLD_ID 	= lnAPFldID
>      lcFieldName	= ALLTRIM( FIELD_NAME)
>      lnAPFactor	= AP_FACTOR
>      Select csrZVARXACT
>      Locate For ALLTRIM( FIELDNAME) = lcFieldName
>      If FOUND()
>	replace FIELDVAL With lnAPFactor In csrZVARXACT
>      Endif
>    Endscan
>    With Thisform.grdCenZoneFields
>      .SetAll( "DynamicBackColor", "IIF( AP_FACTOR > 0, RGB( 0, 0, 255), RGB( 255, 255, 255))", "Column")
>      .SetAll( "DynamicForeColor", "IIF( AP_FACTOR > 0, RGB( 255, 255, 255), RGB( 0, 0, 255))", "Column")
>    Endwith
>Endif
>
>As far as I can ascertain the syntax is exactly as in Help, i.e.
>
>frmMyForm.grdGrid1.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, ;
>RGB(255,255,255), RGB(0,255,0))", "Column")
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform