IIF functions: any samples available?

I try to get IIF expressions to work, but without result.

I get all sorts of variations on stuff the expression seems to miss (),],;,"), and believe me I have tried every variation I could think of.

What do I have to do to get

IIF([DialogForm.Query_Plaatsingsopdracht."FC_INZENDSTATUS"]= 'I', 'Nieuw advertentiemateriaal wordt u toegezonden', 'Herplaatsing van '+ [ [FORMATDATETIME('DD-MM-YYYY', DialogForm.Query_Plaatsingsopdracht."FD_INZENDDATUM") ] )]

to work?

Even as simple as IIF( <1=1> , "Hello 1" , "hello 2 " ) (all variations with ({["; tried) does not compute?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:38PM
    it is designed for use inside a memo you are only allowed 1 set of []
    enclosing the expression
    [IIF(,,)]
    so
    [iif(test expression equates to true, then use this, else use this)]

    it also looks like you are trying to use fr2 code as the query would not be on a dialog in fr4.
  • edited 1:38PM
    This still doesnot show me what is wrong. Are there no samples?

    Also: can i combine multiple IIF 's?

    like

    IIF( x=1 , 'we have 1', IIF( x=2, 'we have 2', 'too many' ) )


    ??
  • edited July 2018
    I've a column keep the following values
    VisitID
    1234
    0
    1235
    0126
    0
    1238
    4
    The answer I need is 4 Excluding 0 in the Group Footer using Totals
    I can use this in the control column like
    wrote:
    [IIf([qryTechnicianDashboard_Details.VisitID]<>0,1,0)]
    but how can I use in the Summary or Group Footer
    Can I use something like:
    Sum ([IIf([qryTechnicianDashboard_Details.VisitID]<>0,1,0)])
    
    If Yes How appreciate your help
    Thanks
  • gpigpi
    edited 1:38PM
    [Sum(IIf(<qryTechnicianDashboard_Details."VisitID"> <> 0, 1, 0))]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.