Skip to main content
Question

Changing specified value with an attribute

  • November 29, 2023
  • 8 replies
  • 1067 views

scarter
Contributor
Forum|alt.badge.img+9

Hello Forum,

 

I've searched previous questions, but couldn’t find an answer. I've no doubt someone has posted this before. But, sorry, I couldn’t see it.

 

I need to replace a specified value within an attribute to another value. I have an attribute (field) called Zone Type. Each cell in that attribute has one of several possible values. Where the value is "container" I need to replace it with "Outside CPZ". I don’t want to change any other values.

 

How do I do this? I've tried through AttributeManager but couldn’t work it out.

 

Thanks,

Stuart

 

 

8 replies

takashi
Influencer
  • November 29, 2023

scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • November 29, 2023
takashi wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,


takashi
Influencer
  • November 29, 2023
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

The Conditional Value Definition should look likd this, if I understand your requirement correctly.

fig-2If the value of "Zone Type" attribute is "container", then assign "Outside CPZ" to "Zone Type", do nothing otherwise.

fig-1


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • November 29, 2023
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

Hi. In your image your have a Test field and a Value field. But in my Conditional Value Definition I have these fields...

  • Logic
  • Left Value
  • Operator
  • Right Value

 

I have set left value to @Value(zoneType) =Container and Right Value to Outside CPZ.

 

I don't think I have got this right.

 

 


takashi
Influencer
  • November 29, 2023
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

Conditional Value definition has a few steps. Hope this screenshot helps.

fig-3


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • November 29, 2023
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

Hi.

 

I cant get it to work set up like that.

 

You've been very helpful, thank you. But I don't want to take up any more of your time. I'll raise a case with Support.

 

Thanks,

 


redgeographics
Celebrity
Forum|alt.badge.img+49
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

Can you post a screenshot of what it looks like on your end?


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • November 29, 2023
scarter wrote:

Thanks for that, takashi

I’ve added a AttributeCreator before the AttributeManager.

I’ve chosen zoneType as the Output Attribute.

In Conditional Value Definition I have Left Value as Container. I have the Operator as =. In the Value box I have Outside CPZ.

But when I run this, the cells that were Container are still Container.

Thanks,

Thanks for that. It's all resolved now.

 

thanks,

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings