Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 144 characters in body
Source Link

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

Im thinking the answer to my question might involve the "Contains ()" function. How does a expression look when using the contains function.

I am using the code below as a symbology expression with limited success.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

I am using the code below as a symbology expression with limited success.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

Im thinking the answer to my question might involve the "Contains ()" function. How does a expression look when using the contains function.

I am using the code below as a symbology expression with limited success.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}
deleted 166 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

UPDATE: I have removed some comments and text that were confusing.

UPDATE: i am using the code below as a symbology expression with limited success, I'm sure there is a better code for what i am trying to achieve. any help is appreciated.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

UPDATE: I have removed some comments and text that were confusing.

UPDATE: i am using the code below as a symbology expression with limited success, I'm sure there is a better code for what i am trying to achieve. any help is appreciated.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

I am using the code below as a symbology expression with limited success.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}
added 200 characters in body
Source Link

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

UPDATE: I have removed some comments and text that were confusing.

UPDATE: i am using the code below as a symbology expression with limited success, I'm sure there is a better code for what i am trying to achieve. any help is appreciated.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

UPDATE: I have removed some comments and text that were confusing.

UPDATE: i am using the code below as a symbology expression with limited success, I'm sure there is a better code for what i am trying to achieve. any help is appreciated.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}

I'm looking for an arcade expression for arcgis pro symbology. Involves the Asset ID field to symbolise based on text within an asset ID.

Say if the asset ID contains C2 then blue (for instance), or if the asset ID contains C1, C3 or GAS, so on and so forth. Imagine a treatment plant with lots of pipes of different colors all based off different common text within the asset ID.

How would the arcade expression look if trying to achieve this?

Maybe another way of putting it would be: What would the symbology expression be if i wanted; 5 different colors based off different text in the asset ID field: "C1", "C2", "C3", "GAS" and "AIR"

UPDATE: I have removed some comments and text that were confusing.

UPDATE: i am using the code below as a symbology expression with limited success, I'm sure there is a better code for what i am trying to achieve. any help is appreciated.

var disp_txt = $feature.ASSET_ID

if (Find("-C2-", disp_txt, 0)>-1) {
    return "C2";
} else if (Find("-C3-", disp_txt, 0)>-1) {
    return "C3";
} else if (Find("-C1-", disp_txt, 0)>-1) {
    return "C1";
} else if (Find("GAS", disp_txt, 0)>-1) {
    return "BIOGAS";
} else if (Find("RS", disp_txt, 0)>-1) {
    return "RAW SLUDGE";
} else if (Find("DSL", disp_txt, 0)>-1) {
    return "DSL";
} else if (Find("AIR", disp_txt, 0)>-1) {
    return "AIR";
} else if (Find("-G-", disp_txt, 0)>-1) {
    return "GRIT";
} else if (Find("PD", disp_txt, 0)>-1) {
    return "PLANTDRAIN";
} else if (Find("TD", disp_txt, 0)>-1) {
    return "TANKDRAIN";
}
added 2 characters in body
Source Link
Loading
added 857 characters in body
Source Link
Loading
added 70 characters in body
Source Link
Loading
deleted 534 characters in body
Source Link
Loading
added 536 characters in body
Source Link
Loading
deleted 35 characters in body
Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404
Loading
Source Link
Loading