如何使查看字段不可见?

时间:2023-01-17 15:40:20

I want to take a value from lookup field. But I neet to make invisible this field. My code is this:

我想从查找字段中获取值。但我想让这个领域变得无形。我的代码是这样的:

public void lookup()
{    
    Query query = new Query();
    QueryBuildDataSource queryBuildDataSource;
    QueryBuildRange queryBuildRange;    
    SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(MYTable), this);    
    sysTableLookup.addLookupField(fieldNum(MYTable, FieldTableA));
    sysTableLookup.addLookupField(fieldNum(MYTable, FieldTableB));
    sysTableLookup.addLookupField(fieldNum(MYTable, RecId), true);    
    queryBuildDataSource = query.addDataSource(tableNum(MYTable));    
    sysTableLookup.parmQuery(query);    
    sysTableLookup.performFormLookup();
}

So, I need to populate the field with RecID, but I don't want to see the RecId in my lookup.

所以,我需要使用RecID填充该字段,但我不想在查找中看到RecId。

It's possible?

这是可能的?

Or, another question, It's possible to get two value for the same record, in my case to get the values from MyTable.FieldTableA and Mytable.FieldTableB?

或者,另一个问题,在我的情况下,可以为同一记录获取两个值,以从MyTable.FieldTableA和Mytable.FieldTableB获取值?

2 个解决方案

#1


1  

No this is not possible with the standard lookup as far as I can tell. You can see how it builds the dynamic lookup form here:

据我所知,标准查找不可能做到这一点。您可以在此处查看它如何构建动态查找表单:

\Classes\SysTableLookupBase\buildGrid

\类\ SysTableLookupBase \ buildGrid

You can make your own custom lookup form.

您可以创建自己的自定义查找表单。

#2


1  

After re-reading your question, what you want to do is common and base functionality.

重新阅读您的问题后,您要做的是常见和基本功能。

It's called using Referenced Data Sources. See below:

它使用引用数据源调用。见下文:

https://msdn.microsoft.com/en-us/library/gg845085.aspx

https://msdn.microsoft.com/en-us/library/gg845085.aspx

You can look how addresses (LogisticsPostalAddress) are stored on objects, such as SalesTable to see.

您可以查看地址(LogisticsPostalAddress)如何存储在对象上,例如SalesTable。

#1


1  

No this is not possible with the standard lookup as far as I can tell. You can see how it builds the dynamic lookup form here:

据我所知,标准查找不可能做到这一点。您可以在此处查看它如何构建动态查找表单:

\Classes\SysTableLookupBase\buildGrid

\类\ SysTableLookupBase \ buildGrid

You can make your own custom lookup form.

您可以创建自己的自定义查找表单。

#2


1  

After re-reading your question, what you want to do is common and base functionality.

重新阅读您的问题后,您要做的是常见和基本功能。

It's called using Referenced Data Sources. See below:

它使用引用数据源调用。见下文:

https://msdn.microsoft.com/en-us/library/gg845085.aspx

https://msdn.microsoft.com/en-us/library/gg845085.aspx

You can look how addresses (LogisticsPostalAddress) are stored on objects, such as SalesTable to see.

您可以查看地址(LogisticsPostalAddress)如何存储在对象上,例如SalesTable。