Skip to content

Display question ID in the Forms UI for easier Windmill automation #2700

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

Open
ericfischereu opened this issue Apr 16, 2025 · 6 comments · May be fixed by #2723
Open

Display question ID in the Forms UI for easier Windmill automation #2700

ericfischereu opened this issue Apr 16, 2025 · 6 comments · May be fixed by #2723
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request

Comments

@ericfischereu
Copy link

Nextcloud (please complete the following information):

  • Nextcloud-Version: 31
  • Forms-Version:

Is your feature request related to a problem? Please describe.
When using Windmill, getting answers from a from submission is only working by querying the question ID. The ID however is not visible in the form.

Describe the solution you'd like
Similar to tables: When editing a column, there's an info icon displaying table and column id. The same should be implemented in Forms: Through the "three dot menu" of a question the question ID should be visible.

Describe alternatives you've considered
It's possible to set a technical name for each question. This however is not returned by the API. If the technical name would be available in the API response, the ID would be obsolete.

Additional context
Example output of /ocs/v2.php/apps/forms/api/v3/forms/{formId}/submissions

{
    "submission": {
        "id": 27,
        "formId": 3,
        "userId": "admin",
        "answers": [
            {
                "id": 105,
                "text": "Laptop",
                "fileId": null,
                "questionId": 7,
                "submissionId": 27
            },
            {
                "id": 106,
                "text": "Super Laptop 5",
                "fileId": null,
                "questionId": 8,
                "submissionId": 27
            }
        ],
        "timestamp": 1744785175,
        "userDisplayName": "admin"
    }
}
@ericfischereu ericfischereu added 0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request labels Apr 16, 2025
@Chartman123
Copy link
Collaborator

@ericfischereu you can get the required information by querying the other endpoints of our API. Especially the GET /api/v3/forms/{formId} where you can find all the information related to that form

@ericfischereu
Copy link
Author

@Chartman123 Or by just running a workflow once, then you see the what's sent. But that's not really user friendly, we're talking about a Low-Code automation solution. I don't think that we can expect from non developers to call endpoints without a template (right now there's not script for getting form information).

Just make it clear: there are solutions for this, but it's not really user friendly. Taking into account that this should be simple to implement, I think it's worth it. But it's also hot a high priority task of course.

@Chartman123
Copy link
Collaborator

Chartman123 commented Apr 16, 2025

Ok, and where did you get the formId from in the first place?

@susnux
Copy link
Collaborator

susnux commented Apr 17, 2025

We should rather use the technical name for that. Thats exactly what it is there for.

@Chartman123
Copy link
Collaborator

But we don't need the technical question name in the submissions endpoint ourselves and it's available through the other endpoints. I don't think that we should extend our API for some third-party tools. Especially if we don't know anything about the use case.

@ericfischereu please explain in detail what you're trying to do. A screen recording could also help to fully understand your feature request.

@ericfischereu
Copy link
Author

I have a workflow, which takes form submissions and writes data into a table.

Image

There I'm using our default "Get a form submission from Nextcloud Forms" script, which calls client.GET("/ocs/v2.php/apps/forms/api/v3/forms/{formId}/submissions"

Now to get the data from the form submission, I have to do something like this in Windmill:

Image

Without knowing the questionId, it's basically just guessing based on the values you see in the data.

For reference, Tables gives you that info right in the UI:

Image

Again, it's possible to set a technical question name and I'm wondering, why this is not returned as a field identifier. This would make the usage a lot easier. Otherwise, It would be necessary to display the question ID in the UI similar to what's done in Tables.

susnux added a commit that referenced this issue Apr 30, 2025
* Resolves #2700

This allows to identify question from within the UI,
as the user can see the name assigned to a question to identify
it when using the submissions in external places like workflows.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux linked a pull request Apr 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants