appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.56k stars 3.73k forks source link

[Enhancement]: Support columns selection in Generate CRUD #8875

Open rishabhrathod01 opened 3 years ago

rishabhrathod01 commented 3 years ago

Is there an existing issue for this?

Summary

Currently on generate CRUD feature user doesn’t get an option to select the particular columns which they need to include on the CRUD page, this needs to be added.

Why should this be worked on?

Due to the constraint of not having control for columns selection, a user needs to manually change the CRUD app (All widgets, All queries) to support the columns user needed to be present.

User on Discord

I keep running into this issue.  For a crud builder to be truly efficient, 
I should not have to manually build the CRUD functionality every time.   
It is way faster for the CRUD wizard to generate fields/queries for all columns in the table, 
and then I manually delete/remove what I don't need Versus the wizard creating a few token fields, 
and then me having to spend a lot of time creating the queries in something like Datagrip (because it is fast), 
and then copying those into Appsmith.   

Can we have the option to delete what we don't need from the wizard, instead of add in what it doesn't generate?    That would be a great start. 

Then for added spice, give us the option to specify in the wizard, which fields we want to include in each of the CRUD queries.

Link - https://discord.com/channels/725602949748752515/725609493974614076/903032161404346368 Another user who faces the same problem - https://discord.com/channels/725602949748752515/725609493974614076/903037931038605312

pchambless commented 3 years ago

IMO I like the option of selecting the columns to add to the form(s). However, as suggested in the other comment, it is MUCH easier to remove columns than to add columns... As a stretch enhancement It would be nice if the form fields were named for the columns. For instance, for an INSERT form, preface each column name with an 'i_'. For Update form, preface each field name with 'u_'

bamboowonder commented 3 years ago

That image looks great to me. We frequently have postgres tables that are generated by another application, that we then need to build a quick crud app for. There are many columns, and the order of them isn't optimal. Being able to choose the columns we want, in an arbitrary order, would be ideal. If the multiselect can retain the order of items chosen that would help.

(I would prefer to do it at this stage, because reordering many columns in appsmith is hard, because the properties pane does not support pgup or pgdown keys while dragging an object. So you can only drag a column to the top of viewport, then release. then scroll up, then drag it again. It gets pretty tedious with many columns, which is normal for us. )

And +1 for intelligent naming of form fields so that renaming them later isn't necessary. As an example, when I copy form fields, it appends the word "copy" instead of just incrementing the suffixed integer that was already used in the autogeneration.