Hi @Dusty_Gregs :
I assume these are datasouce1 and datasource2:
ClearCollect(
DataSource1,
{ID:1,Error:{Text:"Exception in TransmitOrder: Item only valid for sale from 11/23/2018 to 03/27/2021 per Item restriction."}},
{ID:2,Error:{Text:"Exception in TransmitOrder: Item only valid for sale from 11/23/2018 to 03/30/2021 per Item restriction."}},
{ID:3,Error:{Text:"Exception in TransmitOrder: Guest failed age limit check: Age = 1.764, Min = 11.000, Max = 99.000"}},
{ID:4,Error:{Text:"Exception in TransmitOrder: Guest failed age limit check: Age = 10.082, Min = 8.000, Max = 9.999"}},
{ID:5,Error:{Text:"Exception in TransmitOrder: Item can only be sold between 00:00 and 11:45 per Item restriction"}},
{ID:5,Error:{Text:"Exception in TransmitOrder: Item OMNI000014COMBOTIMES1030 must have between 1 and 1 modifiers, and 0 are specified"}}
);
ClearCollect(
DataSource2,
{Error:"Exception in TransmitOrder: Item only valid for sale from XX/XX/XXXX to XX/XX/XXXX per Item restriction."},
{Error:"Exception in TransmitOrder: Guest failed age limit check: Age = XXX.XXX, Min = XXX.XXX, Max = XXX.XXX"},
{Error:"Exception in TransmitOrder: Item can only be sold between XX:XX and XX:XX per Item restriction."},
{Error:"Exception in TransmitOrder: Item XXXX must have between XX and XX modifiers, and XX are specified"}
)
Please try this formula:
Filter(
DataSource2,
TrimEnds(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
DataSource2[@Error],
"XX/XX/XXXX",
""
),
"XXXX ",
""
),
"XXX.XXX",
""
),
"XX:XX",
""
),
":",
""
),
"XX",
""
),
".",
""
)
) in ForAll(
DataSource1,
With(
{
thevalue: Concat(
MatchAll(
Error.Text,
"[a-zA-Z= ,]+"
).FullMatch,
FullMatch
)
},
TrimEnds(
If(
Len(
Match(
thevalue,
"(?<= Item ).*?(?=must)"
).FullMatch
) > 0,
Replace(
thevalue,
Match(
thevalue,
"(?<=Item).*?(?=must)"
).StartMatch,
Len(
Match(
thevalue,
"(?<= Item ).*?(?=must)"
).FullMatch
),
""
),
thevalue
)
)
)
)
)
Best Regards,
Bof