Bulk editing records

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Nick26
Posts: 14
Joined: Fri Aug 07, 2020 6:59 am
Location: Melbourne, Australia

Bulk editing records

Post by Nick26 »

Is there a way to bulk edit certain fields across multiple records?

Example:

I have a query of students, that hold information about their enrolment. I want to select 20 students and move them to another class, but I don't want to open the records individually and change it.

Ideally I would like to have a check box on the left hand side, select the records I want to change & complete the changes in a form.

Any thoughts on how this can be achieved?

Thanks!
PointsWell
Posts: 1112
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Bulk editing records

Post by PointsWell »

Create a query for your classes. Make it small as you'll use it as a pick list. For demo purposes we'll call it ClassQuery

Create a process.
Input should be the BO that you are working with
Process should contain

Pick one from ClassQuery
BO.Attribute=Class.Attribute

On the query from which you want to run the process add a panel operation operation.

Select Run a process use the process you've just created
Check select multiple records
Then save the process

That's it. It will now change all the records to the same value. If you want each record to be processed differently ie GRade calculation

Then you'd create a second process called from the first with the same input. This would then process each record individually, while the first processes all at once setting everything to one value.
Jaymer
Posts: 1944
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Bulk editing records

Post by Jaymer »

Wow, this is freaky.
I just had this exact request come in from a customer today.
We'd like to have the option to update details on multiple inventory items at one time.
Using the Inventory Full Data View, there'll be an added checkbox next to each item row, and a checkbox at the header to select all filtered items. Items selected will not be unchecked when filtering for a different item, or going to another numbered page of the grid.
Once the user has selected the items they want to update, they will select the "Batch Update" button (next to "Restore Column Defaults") and be taken to a screen similar to the inventory's detail page. The details that the user can update are below:
* Owner
* Action (Sell Item, Return to Vendor, Mark as Lost, Disposed)
* Condition
* PhysCount (Movement)
* RecvFromVendor (Movement)
* Purchased (Movement)
* Notes
* Make / Model
* Category
* Doc #
* Equipment PHI (Checkbox)
* Require Accessories (Checkbox)
Once the detail(s) to update is chosen, the user will select "Save" and the items selected will have the detail(s) updated based on what was chosen. If a detail was not chosen to be updated, it will remain as-is. Example: A user updates 20 items to Owner = OEM Medical Solutions, and Require Accessories (check), but the Doc#, Make/Model, etc. all remain how they were previously displayed on those 20 items.
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Nick26
Posts: 14
Joined: Fri Aug 07, 2020 6:59 am
Location: Melbourne, Australia

Re: Bulk editing records

Post by Nick26 »

Thanks for the responses. PointsWell, I'll try your idea and see how I go.

Jaymer, any idea how you'll achieve this?

Nick
Jaymer
Posts: 1944
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Bulk editing records

Post by Jaymer »

Yep. I will post a video tomorrow.
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Nick26
Posts: 14
Joined: Fri Aug 07, 2020 6:59 am
Location: Melbourne, Australia

Re: Bulk editing records

Post by Nick26 »

Thanks, look forward to it!
Jaymer
Posts: 1944
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Bulk editing records

Post by Jaymer »

Here's a VIDEO link to my [a few tweaks needed] end-product in action.

I have an Inventory table.
I have a UserListMaster table. For now, a user can only have 1 list, but could have many. At login I create the user's "List" record if not found.
User.ps_UserList points to his "default list".

In "between" those two records is the many-to-many link table (UserListRecs). In whatever list the user is currently pointing to (again, for now its only pointing to his 1 list, but users COULD have many user-defined lists which contain saved record sets... but this is too complicated for some and not needed now, but the framework is there) I can add a pointer to any given Inventory record (in the video as I add recs to my list).

The grid just FINDs only the LoggedInUser's records in the many-to-many table... with a shortcut to Inventory fields that I want to display.
I have another table InvBulkEdit which is the Form that comes up to enter Bulk Edit values into. Thats a table that holds only 1 record.

Phase 1 is just simple management of the List.

Phase 2 is a simple 2-part process.
Find the user's list (same thing the grid does) to load a set of recs into Context, then
A sub-process which gets all of the UserListRecs "passed to it" for processing.
Its FINDs the InvBulkEdit record, and FINDs each Inventory record to edit.
Then just a series of Rules...
IF InvBulkEdit.ps_Owner IS DEFINED, then set the owner.
IF InvBulkEdit.Condition IS DEFINED, then set the condition.
IF InvBulkEdit.PHI = "Set to Checked" then set PHI = 1.
etc etc

Good luck!
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 611
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Bulk editing records

Post by johntalbott »

It seems like a lot of extra navigating is required of the user to make this work.

My impression is that the desired UX would be something like the user:

1. Selects the rows to be edited from the initial grid
2. Open a blank pop-up edit form
3. Edit the fields, save & close the edit form
4. All the changes are applied to the selected records
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

Services:
-Web/Mobile App Design/Development
-Project Management - Agile, Scrum, Kanban
-Business Analysis
-Testing
johntalbott
Posts: 611
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Bulk editing records

Post by johntalbott »

Here is another approach using a grid with inline editing and some custom JavaScript.

https://screencast-o-matic.com/watch/crhF6hVfkkv
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

Services:
-Web/Mobile App Design/Development
-Project Management - Agile, Scrum, Kanban
-Business Analysis
-Testing
Nick26
Posts: 14
Joined: Fri Aug 07, 2020 6:59 am
Location: Melbourne, Australia

Re: Bulk editing records

Post by Nick26 »

Thanks for the videos and instructions!

John, I agree. Something like the steps you listed would be great.

Jaymer, I'm going to give you way a go thanks.
rocketman
Posts: 1144
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: Bulk editing records

Post by rocketman »

Pointwell's answer is absolutely fine with minimal coding. I have used this for some time to move club members from one membership type to another. So it's exactly like moving classes.

I have a Membership Type form with an embedded grid that contains a list of members for that membership type (referenced attribute - multiples allowed) . In "Panel Operations" of the embedded grid I have a process button to move members to a different membership type (usually Juniors when they hit age 21)

When setting up the Panel Operation, checking "select multiple records" will automatically put a check box against each item in the grid

Using "Item Display Rules" I can change the background colour of the line when they hit age 21, so it's easy to spot the ones that need to move up to full membership
Rocketman

V8.1 Developer Edition. Server 2012 Standard edition. MySql 5.5
Post Reply