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

Handle selection of multi values on input widget value relation #673

Merged
merged 10 commits into from
Oct 14, 2024

Conversation

volterra79
Copy link
Member

@volterra79 volterra79 commented Oct 7, 2024

Closes: #672
Related to g3w-suite/g3w-client-plugin-editing#132 in case of filter_expression

Screenshot from 2024-10-07 17-50-36

@volterra79 volterra79 added the feature New feature or request label Oct 7, 2024
@volterra79 volterra79 added this to the v3.11 milestone Oct 7, 2024
@volterra79 volterra79 requested review from leolami and Raruto October 7, 2024 15:51
@volterra79 volterra79 self-assigned this Oct 7, 2024
@Raruto
Copy link
Collaborator

Raruto commented Oct 8, 2024

@volterra79 I get this warning when I open the form:

image

@volterra79
Copy link
Member Author

volterra79 commented Oct 8, 2024

@Raruto i'll check. Thanks

volterra79 added a commit to g3w-suite/g3w-admin that referenced this pull request Oct 9, 2024
volterra79 added a commit to g3w-suite/g3w-admin that referenced this pull request Oct 9, 2024
@volterra79 volterra79 requested a review from Raruto October 9, 2024 15:48
@volterra79
Copy link
Member Author

volterra79 commented Oct 10, 2024

@wlorenzetti it seems that editing fields configuration about widget relation, key, value are inverted:

QGIS setting input sybtype wiget :

Screenshot from 2024-10-10 11-07-35

G3W-SUITE server configuration from api:

{
    "name": "subtype",
    "type": "varchar",
    "label": "Subtype - Dependent on the value of Type",
    "editable": true,
    "validate": {},
    "pk": false,
    "default": "",
    "input": {
        "type": "select_autocomplete",
        "options": {
            "values": [],
            "default": null,
            "key": "subtype",
            "value": "pkuid",
            "usecompleter": false,
            "orderbyvalue": true,
            "allowmulti": true,
            "layer_id": "type_subtype_caec4a0b_e7c4_4542_b59c_769f2033d6b1",
            "loading": {
                "state": null
            },
            "filter_expression": {
                "expression": "\"type\" = current_value('type')",
                "referenced_columns": [
                    "type"
                ],
                "referenced_functions": [
                    "current_value"
                ],
                "referencing_fields": [
                    "type"
                ]
            }
        }
    }
}

volterra79 added a commit to g3w-suite/g3w-admin that referenced this pull request Oct 11, 2024
@volterra79 volterra79 merged commit 4e1e092 into dev Oct 14, 2024
@volterra79 volterra79 deleted the issue_672 branch October 14, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute editing: value relation widget (multiple selection)
2 participants