Skip to main content
Tweeted twitter.com/StackGIS/status/1600731907226062848
made the question more brief
Source Link
Matt
  • 17.9k
  • 4
  • 23
  • 59

Is it possible to make Make a style rule that tests for a child having an attribute with a given property?

In QGisQGIS/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Here are the parent's fields: enter image description here

and here the child's:

enter image description here

In terms of implementation, there might be too much looping (for each plant, for each observation, is it later than date X, return yes when one is found, no when all are inspected and none has been found), but there isn't that much data.

Is it possible to make a style rule that tests for a child having an attribute with a given property?

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Here are the parent's fields: enter image description here

and here the child's:

enter image description here

In terms of implementation, there might be too much looping (for each plant, for each observation, is it later than date X, return yes when one is found, no when all are inspected and none has been found), but there isn't that much data.

Make a style rule that tests for a child having an attribute with a given property

In QGIS/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Here are the parent's fields: enter image description here

and here the child's:

enter image description here

In terms of implementation, there might be too much looping (for each plant, for each observation, is it later than date X, return yes when one is found, no when all are inspected and none has been found), but there isn't that much data.

Added pictures to clarify the data structure
Source Link

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Here are the parent's fields: enter image description here

and here the child's:

enter image description here

In terms of implementation, there might be too much looping (for each plant, for each observation, is it later than date X, return yes when one is found, no when all are inspected and none has been found), but there isn't that much data.

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Here are the parent's fields: enter image description here

and here the child's:

enter image description here

In terms of implementation, there might be too much looping (for each plant, for each observation, is it later than date X, return yes when one is found, no when all are inspected and none has been found), but there isn't that much data.

added 16 characters in body; edited tags
Source Link

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

In QGis/QField, I have a feature (plants) with child features, which are dated observations of the plant, and I would like to make the appearance (color or shape) of the feature depend on whether there is an observation after some given date, say, July 1 2022 (to make it easy to see whether the plant has resprouted this year). But I haven't managed to work out what the syntax for that would be, or find an example somewhere.

Source Link
Loading