Where's the Advanced Data Sources lesson?

Hi! I’m working with some conditionals that need to be OR statements not IF. I was looking at the conditionals lesson and there’s mention of an easier way to handle conditionals in the Advanced Data Sources lesson, but I can’t seem to find it for the life of me.

Hey @ghanbak, that was a typo sorry about that.

Hey @ghanbak, just thought I’d follow up and see if you were able to accomplish what you needed with Conditionals?

Essentially each Conditional layer is an OR statement. So if = this (first Conditional layer), below that you can just add another Conditional layer if = that, which creates the OR statement. Does that make sense?

That typo was actually related to interpolating the response into an image URL, which will be covered in a tutorial coming out soon, but not actually related to Conditional layer.

I tried that, but it’s not working. I’m using the conditionals demo file and I set a conditional for specific weather codes.

This one does not render

But this one does

Hey @ghanbak, thanks for your patience for us replying here.

Alright for this one, as mentioned each Conditional layer is like the half/part of an OR statement, but your first screenshot that layer would need all Conditions to be true before rendering.

Tldr here is you’ll want to use a separate Conditional layer for each option you might produce.

If firstThing IsTrue, render below that layer. If secondThing IsTrue (this is your second, separate Conditional layer) render things below that.

Check out this file, where I made a separate secondary screen to show the Conditional layers in action like you were trying to set them up:

You’ll see the text layers “conditional: xx” rendering under the Contionals. I only set up the ones that are currently coming back from the response.

So your first screenshot is trying to accomplish that all of those conditions are true before the layer(s) below that Conditional layer will render. Here’s a normal OR statement in text/code form which would be like 2 Conditional layers in Judo:

if (*condition1* ) { 
   //code to be executed if condition1 is true 
} else if (*condition2* ) { 
   //code to be executed if the condition1 is false and condition2 is true 

Whereas your first screenshot is like this:

if (*condition1* && *condition2* ) { 
   //code to be executed if condition1 is true and condition2 is true 

And your second screenshot is possible to render because it’s possible for both of those conditions to be true.

Let me know if this works for you.

I see. So the difference for what I was trying to do is that some of the conditionals share the same “result”.

e.g. weather codes 801 and 802 would share the same icon/image

So I wanted to do an if statement like this using the logical OR operator:

if ( *condition1* || *condition2* ) { 
  //code to be executed if condition1 is true or condition2 is true