I want to ping the SQL table once per record. Instead of a lookup for each column one at a time. My forall() may get quite big. I want to limit the server calls.
ClearCollect(AttachedFile_Data,ForAll(AttachedFile_PreData,
{ FileName: FileName,
WO_Num: ThisRecord.WO_Num,
SNRange: ThisRecord.SNRange,
Filename: ThisRecord.FileName,
WO_Line: ThisRecord.WO_Line,
OrderNumberOB: ThisRecord.WO_Num&"-"&ThisRecord.WO_Line,
ShouldBeName: "WO "&WO_Num&"-"&WO_Line&" "&SNRange&".pdf",
GUIDOrder: LookUp('[dbo].[View_Orderboard_Acctivate]',OrderNumber=WO_Num And LineNumber=WO_Line).GUIDOrder,
GUIDOrderDetail: LookUp('[dbo].[View_Orderboard_Acctivate]',OrderNumber=WO_Num And LineNumber=WO_Line).GUIDOrderdetail,
FileNameCheck: If(SNRange=LookUp('[dbo].[View_Orderboard_Acctivate]',OrderNumber=WO_Num And LineNumber=WO_Line)._SNValve,true,false)
}
The statement above works, but I want to do a single lookup into a variable, then use variable.GUIDOrder and variable.GUIDOrderDtail, etc. I'm sure there is a way to do this with a With() statement, but I couldnt place it in this statement in a place where it worked proper. Well, I never resolved syntax problems.
Helpie?
Thanks