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.

  • November 5, 2020
  • 3 replies
  • 31 views

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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+62

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+62

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.