Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] array_foreach expression function - add counter variable #54962

Merged
merged 3 commits into from Oct 29, 2023

Conversation

pathmapper
Copy link
Contributor

Original motivation is here to combine values from multiple array fields after OGR GML import for label expressions, e.g.

array_foreach( "field_1", @element || ' ' || "field_2"[@counter] )

but there are other use cases for sure.

Test added and function help updated.

@github-actions github-actions bot added this to the 3.34.0 milestone Oct 17, 2023
@Gustry
Copy link
Contributor

Gustry commented Oct 17, 2023

Good idea.
Can you add a note that the counter starts at 0 ?
Usual, but better mentioning than guessing ;-)

@pathmapper
Copy link
Contributor Author

Thanks @Gustry, done in 38be39e.

@nyalldawson nyalldawson added the Frozen Feature freeze - Do not merge! label Oct 17, 2023
Co-authored-by: Björn <pathmapper@posteo.de>
@nyalldawson nyalldawson added Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting and removed Frozen Feature freeze - Do not merge! labels Oct 28, 2023
@nyalldawson nyalldawson enabled auto-merge (rebase) October 28, 2023 21:39
@qgis-bot
Copy link
Collaborator

@pathmapper

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@qgis-bot
Copy link
Collaborator

@pathmapper
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@nyalldawson nyalldawson merged commit fb98e1a into qgis:master Oct 29, 2023
38 checks passed
nyalldawson pushed a commit that referenced this pull request Oct 29, 2023
@github-actions
Copy link

@pathmapper
A documentation ticket has been opened at qgis/QGIS-Documentation#8582
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@pathmapper pathmapper deleted the foreach_counter branch December 26, 2023 10:07
@pathmapper pathmapper restored the foreach_counter branch December 26, 2023 10:08
@pathmapper pathmapper deleted the foreach_counter branch December 26, 2023 10:09
@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants