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

Api4 - Support wildcard * in select clause #16302

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jan 16, 2020

Overview

Allows you to incorporate the * wildcard into the SELECT clause of Api4 Get actions, greatly improving convenience especially when using joins & custom fields.

Before

Every field must be selected individually. There's no "select all" or "select all fields that start with ___".

After

Fields can be selected en-masse with the * wildcard. This is supported across joins and also works with partial fieldname matching. E.g. select: ['*_name'] would match first_name, last_name, display_name, etc. Or you can do select: ['*', 'emails.*', 'constituent_information.*'] to select all core fields, plus all fields from a join and all fields from a custom group.

Comments

Tests and Api Explorer support added.
image

@civibot
Copy link

civibot bot commented Jan 16, 2020

(Standard links)

@civibot civibot bot added the master label Jan 16, 2020
@colemanw
Copy link
Member Author

retest this please

@eileenmcnaughton eileenmcnaughton merged commit 2497964 into civicrm:master Jan 17, 2020
@eileenmcnaughton eileenmcnaughton deleted the wildcards branch January 17, 2020 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants