以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  getvalues或Getcomboliststring的结果如何转换成 in (“**”,“**”)类型可以判断的数据  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=154559)

--  作者:guosheng
--  发布时间:2020/9/18 13:25:00
--  getvalues或Getcomboliststring的结果如何转换成 in (“**”,“**”)类型可以判断的数据
1、Getcomboliststring获取数据再转换
dim str as string = DataTables("表1").Getcomboliststring("编号").replace("|",",") 
Tables("表2").filter="编号 In (" & str & ")"
2、getvalues获取数据再转换
Dim str As  List(Of String) = DataTables("表1").Getvalues("编号")
Tables("表2").filter="编号 In " & str 
[此贴子已经被作者于2020/9/18 13:30:28编辑过]

--  作者:有点蓝
--  发布时间:2020/9/18 13:41:00
--  
1、Getcomboliststring获取数据再转换
dim str as string = DataTables("表1").Getcomboliststring("编号").replace("|","\',\'") 
Tables("表2").filter="编号 In (\'" & str & "\')"
2、getvalues获取数据再转换
Dim str As  List(Of String) = DataTables("表1").Getvalues("编号")
Tables("表2").filter="编号 In (\'" & string.join("\',\'",str.tparray) & "\')"