Need to update multiple rows at once

Hello Everyone,

I have an end user that needs the ability to update multiple rows at once. She’s looking to drag select multiple rows and update a drop down field for every row selected.

First I’ll start with how the dashboard works.
Its a transportation dashboard where there is a column for ShipVia. One tab of the dashboard is filtered to have all rows with ShipVia = BestWay. My user will go through each row one at a time, select the ShipVia column, and select an option from the drop down. When that selection is made then ShipVia != BestWay and the row is thrown to the other tab of the dashboard.

Here are my issues.
I’ve tried the export to excel - paste/update option, however I run into a problem when the data is pasted back into Epicor. The first row updates fine but then rows are being skipped because the rows that get updated previously are being thrown into the other tab and I’m guessing its throwing off the indexing so it ends up updating the wrong rows.

I’m not sure which direction to go from here. Any suggestions? I imagine a BPM of some sort will do the trick but can’t think of a solution at the moment.

Sounds like you need to customize your dashboard assembly.

Maybe I am wrong…but would updatable dashboard be a valid option to do this?

Could you expand on this comment? “…The first row updates fine but then rows are being skipped because the rows that get updated previously are being thrown into the other tab and I’m guessing its throwing off the indexing so it ends up updating the wrong rows”

Paste Update is very strict. The ShipVia column should be the first column, and you want to make sure you have ShipVia values copied for each row when you paste it.

Not to assume you are using it incorrectly, but I have found that if everything is not formatted exactly right, Paste Update will do the first row okay and mess up the others, as you said.

1 Like

Sorry I forgot to mention that it was set up as an updatable Dashboard. The user can update each row one at a time but she usually has to update up to 50 rows at a time multiple times a day and it slows her process down quite a bit.

Thanks for the suggestion. I moved Ship Via to be the first column to test again.

Here’s a quick example. I selected the two rows with Order 400456. I copied to excel then I updated the Ship Via column. When I pasted back in, the paste/update did the first row fine, then skipped the next one and updated Order 400472.

It still says Best Way because I changed them back manually after testing.

image

The Paste/Update function works fine for this dashboard, I tested on a comment field. It just gets messed up when I try to paste/update the ShipVia column because of the filter on the grid. Once the Ship Via != Best Way then the row is filtered out and the next update on the grid skips a row.

Try this:

  1. in the updatable dashboard also create a calculated field Boolean field called “Select”
  2. Also create a custom “Action” that executes a pop-up BPM Form that asks what the new ship-via should be
  3. then in the custom action, change all rows where “Select” is true" to the new ship-via

In use from the dashboard… the user would still need to check the boxes (which is quick) and then choose the custom action from the actions menu.

1 Like

Friday aftermoon fun –

Building on what Tim has suggested - and providing you with a little jump start on the task - here is code from the “Customiztion to the Max” Extended Education Class at Epicor Insights - Copyright Epicor Software 2016.

Below I am including the full text of a Customization made against an Updateable Dashboard where the UBAQ was created against UD05. Much of the code is added by the Customization IDE and you will see that the task of updating Selected rows is really not that difficult.

In the Customization two Buttons were added to the Dashboard - one “Checks” all the Selected records in the Grid, the other “UnChecks” all the selected records in the grid. This Customization leverages the Selected Property of a Grid row rather than using a Checkbox on each row as suggested by Tim, but it is essentially the same concept.

Easy Peasy - happy coding.


public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **

// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **

public void InitializeCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization

	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls

	this.btnUncheckSelect.Click += new System.EventHandler(this.btnUncheckSelect_Click);
	this.btnCheckSelect.Click += new System.EventHandler(this.btnCheckSelect_Click);
	// End Wizard Added Custom Method Calls
}

public void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal

	this.btnUncheckSelect.Click -= new System.EventHandler(this.btnUncheckSelect_Click);
	this.btnCheckSelect.Click -= new System.EventHandler(this.btnCheckSelect_Click);
	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal
}

// get the Grid from the GridViewPanel
EpiUltraGrid myGrid
{
	get {
		return ((Ice.Lib.Framework.UIApp.EpiGridPanel)
			(csm.PersonalizeCustomizeManager.ControlsHT["your_UBAQ_grid_GUID"])).EpiGrid;
	}
}
void changeCheckBox01(bool check)
{
	if (myGrid == null) return;		// verify we can find the grid
	foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in myGrid.Selected.Rows)
	{
		if (row.Cells.Exists("UD05_CheckBox01")) 
			row.Cells["UD05_CheckBox01"].Value = check;
	}
}	

private void btnUncheckSelect_Click(object sender, System.EventArgs args)
{
	changeCheckBox01(false);	// set checkbox true
}

private void btnCheckSelect_Click(object sender, System.EventArgs args)
{
	changeCheckBox01(true);	// set checkbox true
}

}

3 Likes

Hi Tim,

I’d like to try this method out, I’m just confused about the first step. When I create the calculated Boolean what am I putting in the expression? I defaulted it to false, but it stays false, so I tried null but then the field is just greyed out.

Thanks for the help everyone. Tim and Rich, you both got me going in the correct direction. I ended up adding a calculated Select field that was defaulted at 0. I added it to the UBAQ and made it an updatable field. It was grayed out in my previous post because I forgot to deploy the dashboard then test it like a smart guy.

So after that I created a BPM Data form that prompted which fields the user wanted to update and assigned the user selections to some callContextBPMData fields. For the dropdown fields I added a new combofield in order to get multiple field values and for text fields I just added a normal blank field.

Then I did an Updatable BAQ Method Directive on the Update method of the UBAQ (This is where I was stuck because I was unaware of Updatable BAQ Method Directives). If the Select is true on the checked then call the BPM Form and update the fields that the user selected in the BPM Form.

If anyone has any questions, suggestions or “Hey, don’t do that” let me know please. :slight_smile:

1 Like

what you did is what I was suggesting… the other thing you could have done to skip the BPM Form was to add your form fields as additional calculated fields… in the calculations, just put default values, or blank/zero if numeric. Then the BPM can just grab those fields from the BAQ Row.

1 Like