Skip to main content
Question

Hi! Is there a way to change the "else if" condition statement to an "if" condition? I want to assign two values ​​to the same element and with the "else if" I just assign the first value.


Hi! Is there a way to change the "else if" condition statement to an "if" condition? I want to assign two values ​​to the same element and with the "else if" I just assign the first value.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

That's due to the way the if..else if system works. If a feature matches the condition set in the first if it will not pass through the others.

It's a bit hard to get what you're trying to do, can you elaborate a bit? Give an example maybe?


  • Author
  • November 5, 2020

Basically I would like to change the "else if" condition to an "if". For example, I am converting files to PostGIS and I want to assign a single element (building) to two attributes in the same table (commercial and residential use). As the residential use appears first, I can only assign that usage.


redgeographics
Celebrity
Forum|alt.badge.img+50
mvmunicipia wrote:

Basically I would like to change the "else if" condition to an "if". For example, I am converting files to PostGIS and I want to assign a single element (building) to two attributes in the same table (commercial and residential use). As the residential use appears first, I can only assign that usage.

You could do an AttributeManager with conditional statements on multiple attributes.


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