You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
In 2sxc, from what I've learned, there are 4 ways to change data in a table/entity:
Manual click and edit in admin interface
REST / webapi in a view
App.Data in a controller
Export to xml, edit in excel, import again
What is the motivation / use case for changing the behavior?
Manual editing is slow, api involves creating views (and controllers sometimes) and excel is a piece of s*** for managing data.
What could be implemented
A direct command line interface like DNN SQL Console could be implemented so that two things could run:
Either a SQL support feature so that mass changes could be run with a single query, with proper API to use the app data, and not the DNN database (awesome)
Or a C# quick compile feature so that quick changes could be written like:
@foreach(var row in AsDynamic(App.Data["entity"]))
{
if(row.field == "oldvalue")
{
var editSet = new Dictionary<string, object>();
editSet.Add("field", "newvalue");
App.Data.Update(row.id, editSet);
}
}
}
This would probably error due to changing items while itinerating and calling the API multiple times in succession, but you get the idea.
This could also be used to quick change a field into another type (like copying a string field into a numeric new field, but using tryparse to check if it passes.
I know this is very far fetched, but think about it for version 11 or something.
The text was updated successfully, but these errors were encountered:
Thanks for the input. Without knowing the details, I believe what you wrote could already work. And if you would put all new values into an array first, it could also be batch-updated. So I'm not sure if adding anything would be necessary?
SQL support would be a huge improvement in data management (and a quick c# compiling and running too) since they wouldn't need a module, a view, and probably a controller to achieve this. And sql would give a whole new level to data querying. Linq is fine for many things, but sql is sql.
I'm submitting a ...
[x] feature request
...about
[x] Content Types or data management
Current behavior
In 2sxc, from what I've learned, there are 4 ways to change data in a table/entity:
What is the motivation / use case for changing the behavior?
Manual editing is slow, api involves creating views (and controllers sometimes) and excel is a piece of s*** for managing data.
What could be implemented
A direct command line interface like DNN SQL Console could be implemented so that two things could run:
This would probably error due to changing items while itinerating and calling the API multiple times in succession, but you get the idea.
This could also be used to quick change a field into another type (like copying a string field into a numeric new field, but using tryparse to check if it passes.
I know this is very far fetched, but think about it for version 11 or something.
The text was updated successfully, but these errors were encountered: