It seems this wouldn't be had but power apps has succeeded in driving me nuts:
I have 2 collections, colSource, and colDest. They have an index column, index, and 12 data point columns.
A definition of one is
ClearCollect(
colSource,
ForAll(
Gallery1.AllItems,
{
Index: "",
SALT_CODE: ALT_CODE,
SDG_ID: DG_ID,
SGPH: GPH,
SL1: L1,
SL2: L2,
SL3: L3,
SL4: L4,
SLB_ID: LB_ID,
SPID: PID,
SPROD_DESC: PROD_DESC,
SVENDOR_ID: VENDOR_ID,
SVENDOR_NAME: VENDOR_NAME
}
)
);
ForAll(
Sequence(CountRows(colSource)),
Patch(
colSource,
Last(
FirstN(
colSource,
Value
)
),
{Index: Value}
)
);
colDest is the same thing except with D as a field prefex.
All I am trying to accomplish is to have a button that combines them on index so the colCombo has 25 columns: index, 12 from colSource,12 from colDest.
I have tried writing this a dozen ways and nothing seems to work from simple
ClearCollect(colCombo, colSource, colDest)
to more complex
ClearCollect(colCombo,
ForAll(colSource,
{
Index: "",
SALT_CODE: SALT_CODE,
SDG_ID: SDG_ID,
SGPH: SGPH,
SL1: SL1,
SL2: SL2,
SL3: SL3,
SL4: SL4,
SLB_ID: SLB_ID,
SPID: SPID,
SPROD_DESC: SPROD_DESC,
SVENDOR_ID: SVENDOR_ID,
SVENDOR_NAME: SVENDOR_NAME,
DALT_CODE: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DALT_CODE]),
DDG_ID: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DDG_ID]),
DGPH: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DGPH]),
DL1: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DL1]),
DL2: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DL2]),
DL3: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DL3]),
DL4: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DL4]),
DLB_ID: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DLB_ID]),
DPID: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DPID]),
DPROD_DESC: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DPROD_DESC]),
DVENDOR_ID: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DVENDOR_ID]),
DVENDOR_NAME: LookUp(colDest, colDest[@Index] = colSource[@Index],colDest[@DVENDOR_NAME])
}
)
)
and all I get is error the function 'ClearCollect' has some invalid arguments
this out of all the power languages is by far the most frustrating to work in.
Any solutions out there?