Can you guess what the JSON string value of ctxJson will be?
UpdateContext(
{
ctxJson: JSON(
If(
true,
{
onBothRecords: "First record",
onlyOnFirstRecord: "onlyOnFirstRecord"
},
{
onBothRecords: "Second record",
onlyOnSecondRecord: "onlyOnSecondRecord"
}
)
)
}
);
SPOILER:
The answer is:
{"onBothRecords":"First record"}
So it seems that only the fields from the first record that are available on both records will be returned, otherwise the "onlyOnFirstRecord" field would have been serialized too.
Can somebody post some link(s) to an article or docs where this problem/feature is described? Is this a known issue?
PS. I attached an example Power App, so you can see this code in action.