Hi all, this is the code I am working with but I can't get past Line 3. This code worked like a charm in my old web map but I had to republish the web layers in a new map with revised schema and now it doesn't work. I've checked all the editing settings which are correct but I'm not sure how I need to fix my Playground error "$layer is not defined". Note: This relational database is in design, so no feature data yet. Basically, when the customer feature is created the CustomerID is populated and then sequenced as below. As I mentioned, it was working in the old map. I'm not sure where or what to check now and I can't find any examples of using $layer in all the resources on line. Would be very grateful for some advice on this! @bbollin
@KenBuja would you be able to point me in the direction of troubleshooting why my $layer is not defined?
Thank you, Kristal
Playground doesn't use a profile where you can use $layer. If you click on "Profile variables", it only shows "$feature".
You'll have to test out your code in a web map where you have access to more profile variables.
I saw that and wasn't sure if that was indicating some problem. I understand though and have tested it in the Web Map but not sure where to look for a problem since this worked in my other map. Is there a different way to define the layer that I'm not thinking about? I understood that $layer should be specific to the layer (and all the features) of the field where the expression is being written.