Ballycroy Posted November 3, 2009 Posted November 3, 2009 I have a calculation the result of which is a container. The calculation checks for the system platform. Case ( Get ( SystemPlatform ) = -1; "imagemac:/Images/FolderBW/ & ImageName ".jpg"; "imagewin:/F:/FolderBW/ & ImageName ".jpg";) I now need to test for another condition: if the image is Black and White or Colour. Case ( ColourSign ≠ "Colour"; "imagemac:/Images/FolderBW/ & ImageName ".jpg"; "imagemac:/Images/FolderColour/ & ImageName ".jpg";) How would I combine these calculations so that I check for the system platform and the ColourSign field.
Raybaudi Posted November 3, 2009 Posted November 3, 2009 Case( Get ( SystemPlatform ) = -1 ; "imagemac:/Images/" & If ( ColourSign ≠ "Colour"; "FolderBW/" ; "FolderColour/" ) & ImageName & ".jpg"; "imagewin:/F:/" & If ( ColourSign ≠ "Colour"; "FolderBW/" ; "FolderColour/" ) & ImageName & ".jpg" ) or simpler: Let( cond = If ( ColourSign ≠ "Colour"; "FolderBW/" ; "FolderColour/" ) & ImageName & ".jpg" ; Case( Get ( SystemPlatform ) = -1 ; "imagemac:/Images/" ; "imagewin:/F:/" ) & cond )
IdealData Posted November 4, 2009 Posted November 4, 2009 BEWARE: you are only checking for PowerPC based Macs with -1 result. The function also returns +1 for Intel Macs - use: Abs (Get (SystemPlatform)) = 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now