How can I implement user-friendly boolean logic in a web form GUI?

后端 未结 8 1554
Happy的楠姐
Happy的楠姐 2020-12-23 10:22

Currently I have a web application where a user can use dropdown lists to generate SQL SELECT statements like so:

Column Select Dropdown | Operator Dropdown (= != >

8条回答
  •  余生分开走
    2020-12-23 10:37

    This is difficult to represent even in a WinForms app.

    What you need to do is implement the concept of a condition group, which consists of one or more statements, and a conditional operator.

    The best implementation of this I've see was from GameSpy server filtering -- I just tried to search to find a screenshot, but I came up empty (does that program still exist?). From what I recall, they did something like this:

    (
        Condition 1
    ) OPERATOR
    (
        Condition 2
    ) OPERATOR
    (
        (
            Condition 3
        ) OPERATOR
        (
            Condition 4
        )
    )

提交回复
热议问题