Feature request - auto update dynamic get when adding fields to admin view #370

Closed
opened 2019-01-26 23:55:57 +00:00 by TLWebdesign · 8 comments
TLWebdesign commented 2019-01-26 23:55:57 +00:00 (Migrated from github.com)

The title says it all. It would be nice when creating a dynamic get that there would be a toggle switch "auto update". If set to yes it would automagically update the dynamicGet with the new field when a new field is added to the admin view. I guess it should only work with getItem and getItemList. not the custom options.

The title says it all. It would be nice when creating a dynamic get that there would be a toggle switch "auto update". If set to yes it would automagically update the dynamicGet with the new field when a new field is added to the admin view. I guess it should only work with getItem and getItemList. not the custom options.

hmmm lets see, that will mean all the fields are added with the update right?

I can add this, very easy actually. But the drawback is that it will not be selective (all fields will be added), and only work on the Back-end Views not the Joomla Database as the source. I can also make it target the Join View Tables but again it will not be selective (all fields will be added).

So we will add two switches, one for the Main Source, and one for each Join View Table. How it will work, at the moment you add the field to the Back-end View (admin view) there will be a function updating all dynamic gets and joints that target that view, if they have the Auto Update selected in the dynamic get.

Did I understand you correctly? I like the idea, a nice time safer, and these kind of things are always welcome.

hmmm lets see, that will mean all the fields are added with the update right? I can add this, very easy actually. But the drawback is that it will not be selective (all fields will be added), and only work on the **Back-end Views** not the _Joomla Database_ as the source. I can also make it target the **Join View Tables** but again it will not be selective (all fields will be added). So we will add two switches, one for the **Main Source**, and one for each **Join View Table**. How it will work, at the moment you add the field to the Back-end View (admin view) there will be a function updating all dynamic gets and joints that target that view, if they have the Auto Update selected in the dynamic get. Did I understand you correctly? I like the idea, a nice time safer, and these kind of things are always welcome.
ro-ot commented 2019-01-27 17:34:37 +00:00 (Migrated from github.com)

I think sync is a better term here. To keep the selection in sync with the selected view and if that is true then hide the selection text area, or make it read only.

I think sync is a better term here. To keep the selection in sync with the selected view and if that is true then hide the selection text area, or make it read only.
TLWebdesign commented 2019-01-28 11:21:47 +00:00 (Migrated from github.com)

that's nice indeed. I think the toggle switch "auto sync" would be set in dynamic Get. And indeed if set to yes it would just add all fields from the backend view it is connected to. So this could look like this:

schermafbeelding 2019-01-28 om 12 21 26

that's nice indeed. I think the toggle switch "auto sync" would be set in dynamic Get. And indeed if set to yes it would just add all fields from the backend view it is connected to. So this could look like this: ![schermafbeelding 2019-01-28 om 12 21 26](https://user-images.githubusercontent.com/4402824/51833270-44ea8f00-22f7-11e9-81b6-b17b3e16b5c4.png)
TLWebdesign commented 2019-01-28 11:24:03 +00:00 (Migrated from github.com)

Did I understand you correctly? I like the idea, a nice time safer, and these kind of things are always welcome.

You did! 👍 Having this also on linked would be even more awesome and it'll indeed be a timesaver 😄

> Did I understand you correctly? I like the idea, a nice time safer, and these kind of things are always welcome. You did! 👍 Having this also on linked would be even more awesome and it'll indeed be a timesaver 😄

Okay I came up with a more elegant solution. Which is more instep with the expected behavior. That is if you too are a coffee drinker 👍

Instead of auto sync I added a switch to Select All, which then adds a.* to the selection area and will effectively do just that. This way we don't need extra scripts to update the get, since the query will always retrieve all the fields.

Then to get this to work on the joint areas you simple replace the selection with the befitting b.* or c.* as related to the AS selection and it will have the same behavior, done!

Take it for a ride and let me know!

Okay I came up with a more elegant solution. Which is more instep with the expected behavior. That is if you too are a coffee drinker :+1: Instead of **auto sync** I added a switch to **Select All**, which then adds `a.*` to the selection area and will effectively do just that. This way we don't need extra scripts to update the get, since the query will always retrieve all the fields. Then to get this to work on the joint areas you simple replace the selection with the befitting `b.*` or `c.*` as related to the AS selection and it will have the same behavior, done! Take it for a ride and let me know!
TLWebdesign commented 2019-01-29 14:45:50 +00:00 (Migrated from github.com)

Nice solution indeed! 👍 No coffee for me tho hihi 😉

Nice solution indeed! 👍 No coffee for me tho hihi 😉

O yes and it works for both view and database selection.

O yes and it works for both view and database selection.
TLWebdesign commented 2019-01-29 15:00:57 +00:00 (Migrated from github.com)

Works like a charm! Thanks very much

Works like a charm! Thanks very much
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#370
No description provided.