我有一个场景,其中有一个高价值的LOV作为"包"和TYPE =" TO_NEW_PACKAGE"我必须获取Low的值,Low中有8个记录。我必须显示每条记录的所有8条记录及其组件成本。所有这些应该作为显示消息将被输出。请让我知道如何做到这一点。
var sSearchExp =" [Type] ='" +" PACKAGE_PLAN" +"' AND [高] ='" + PACKAGEPLAN +"'&#34 ;; SetSearchExpr(sSearchExp);的executeQuery(); var isRecord = FirstRecord(); while(isRecord){Slow = GetFieldValue(" Low"); Outputs.SetProperty(" NEW_PACKAGE_PLAN",Slow); Outputs.SetProperty(" ErrorCode"," 00"); Outputs.SetProperty(" ErrorDesc"," Success"); i = i + 1; isRecord = NextRecord(); }
这只存储了1条记录...我想要显示所有8条记录!
答案 0 :(得分:1)
这应该让你入门
var sSearchExp = "[Type]= '" + "PACKAGE_PLAN" + "' AND [High] = '" + PACKAGEPLAN + "'";
var Slow = "";
SetSearchExpr(sSearchExp);
ExecuteQuery();
var isRecord = FirstRecord();
while (isRecord) {
Slow += GetFieldValue("Low");
Slow += " ";
i = i + 1;
isRecord = NextRecord();
}
Outputs.SetProperty("NEW_PACKAGE_PLAN", Slow);
Outputs.SetProperty("ErrorCode", "00");
Outputs.SetProperty("ErrorDesc", "Success");
答案 1 :(得分:0)
此示例代码将向下打印值:
var boAsset = TheApplication().GetBusObject("List Of Values");
var bcAsset = boAsset.GetBusComp("List Of Values");
with (bcAsset)
{
ActivateField("Value");
var sSearchExp = "[Type]= 'AAG_TABLE_TYPE'";
var Slow = "";
SetSearchExpr(sSearchExp);
ExecuteQuery();
var isRecord = FirstRecord();
while (isRecord)
{
Slow += GetFieldValue("Value");
Slow += "\n";
isRecord = NextRecord();
}
TheApplication().RaiseErrorText(Slow);
}
输出:
AAG Account
AAG Holdg
AAG Portf
AAG Txn
将Slow += "\n";
更改为Slow += " ";
会将值打印到侧面。
希望你能在这里得到诀窍。