在客户屏幕上过滤不使用多个过滤器 [英] Filtering on Customer Screen does not use more than one filter

查看:71
本文介绍了在客户屏幕上过滤不使用多个过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AR303000屏幕搜索客户。如果添加多个过滤器,则仅应用第一个过滤器。此外,结果集不包含GeneralInfoMainAddress行。

I am using the AR303000 screen to search for a customer. If I add more than one filter only the first filter is applied. Also, the results set does not include the GeneralInfoMainAddress lines. This may be why the filter is not working.

AR303000Content AR303000 = context.AR303000GetSchema();
context.AR303000Clear();

AR303000Content AR303000 = context.AR303000GetSchema(); context.AR303000Clear();

        List<Command> cmds = new List<Command>();
        cmds.Add(AR303000.CustomerSummary.ServiceCommands.EveryCustomerID);

        cmds.Add(AR303000.CustomerSummary.CustomerID);
        cmds.Add(AR303000.CustomerSummary.CustomerName);
        cmds.Add(AR303000.GeneralInfoMainAddress.AddressLine1);
        cmds.Add(AR303000.GeneralInfoMainAddress.City);
        cmds.Add(AR303000.GeneralInfoMainAddress.State);
        cmds.Add(AR303000.GeneralInfoMainAddress.PostalCode);

        List<Filter> filters = new List<Filter>();
        filters.Add(new Filter()
        {
            Field = new Field()
            {
                FieldName = AR303000.CustomerSummary.CustomerName.FieldName,
                ObjectName = AR303000.CustomerSummary.CustomerName.ObjectName
            },
            Condition = FilterCondition.Contain,
            Value = "DOE, JOHN",
            Operator = FilterOperator.And
        });
        filters.Add(new Filter()
        {
            Field = new Field()
            {
                FieldName = AR303000.GeneralInfoMainAddress.AddressLine1.FieldName,
                ObjectName = AR303000.GeneralInfoMainAddress.AddressLine1.ObjectName
            },
            Condition = FilterCondition.Contain,
            Value = "255",
            Operator = FilterOperator.And
        });

        var AR303000Export = context.AR303000Export(cmds.ToArray(), filters.ToArray(), 0, false, false);

        return AR303000Export[0][0];


推荐答案

Web服务只能在主字段上过滤屏幕视图,在这种情况下为AR303000.CustomerSummary。如果您尝试对其他内容进行过滤,则系统不会抛出异常,而是会静默丢弃过滤器。

The web services can only filter on fields of the primary view of the screen, in this case AR303000.CustomerSummary. If you try to filter on anything else, the system doesn't throw an exception, but instead silently discards the filter.

如果您需要能够对此进行过滤信息,建议您创建一个通用查询,将其连接到所需的表上,并像使用任何其他查询屏幕一样,通过Web服务使用GI屏幕。

If you need to be able to filter by this information, I would suggest that you create a generic inquiry that joins on the tables that you need, and use the GI screen through web services as you would with any other inquiry screen.

这篇关于在客户屏幕上过滤不使用多个过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆