Sorry for raising yet another mysterious issue. I'm breaking my head over a problem I'm running into in my app.
I'm writing a handler for the 'OnCheck' event of a toggle switch. I was able to analyze it down to the following simple example:
UpdateContext({ connectioncheck: Connection.Connected, patch: true } );
With({ name: "Bill" },
If( connectioncheck,
With( { something_else: "" },
If( patch,
Notify("patching");
//Patch(Users, Defaults(Users), { 'Full Name': name } );
,
Notify("not patching");
);
);
,
Notify("collect");
//Collect(dummycollection, { fullname: name });
);
);
This code will not do a lot yet, but is considered correct.
You will notice I commented out 2 lines. Those are required for the code to actually do what I want. However, when any (or both) of those lines are uncommented, the editor starts throwing errors (mostly simply saying 'The function If has some invalid arguments').
I don't see what's going wrong here. I've used nested "With" constructions in more places in my app and never ran into this problem?