Skip to Content
author's profile photo Former Member
Former Member

Trying to add conditions to a data source

Hi

I am using SAP 2005a SP01 PL36. I have added some conditions to a dbdatasource, the code is below

If I only have the first condition it works fine but when I add the second condition it doesn't return any data

Can anyone suggest anything please ?

Thanks

Regaerds Andy

ocondition = oconditions.Add

ocondition.Alias = "docentry"

ocondition.Operation = BoConditionOperation.co_EQUAL

ocondition.CondVal = "8"

' add condition to only show '01' warehouse

ocondition = oconditions.Add

ocondition.Alias = "whscode"

ocondition.Operation = BoConditionOperation.co_EQUAL

ocondition.CondVal = "01"

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 10, 2008 at 11:12 AM

    you are missing the .Relationship and .BracketOpenNum

    when you look in the UIAPI documentation you see

    '// WHERE ((CardType = 'C') Or (CardType = 'S'))

    '// the conditions collection encapsulates the WHERE clause

    '// of a select statement

    Set oCondition = oConditions.Add

    '// ((CardType = 'C') Or

    oCondition.BracketOpenNum = 2

    oCondition.Alias = "CardType"

    oCondition.Operation = co_EQUAL

    oCondition.CondVal = "C"

    oCondition.BracketCloseNum = 1

    oCondition.Relationship = cr_OR

    Set oCondition = oConditions.Add

    '// (CardType = 'S'))

    oCondition.BracketOpenNum = 1

    oCondition.Alias = "CardType"

    oCondition.Operation = co_EQUAL

    oCondition.CondVal = "S"

    oCondition.BracketCloseNum = 2

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.