UBAQ Dashboard doesn't recognize changed state and so will not save

Hello all, have searched a lot on here and found several possible solutions, but not getting anywhere.

I have a UBAQ that parses its input and calls a EFX function to create quick jobs.

I’m trying to use it to review hundreds of open transfer orders and identify where jobs are required to fill them.

If the user selects individual TO lines on my dashboard thusly:

Save becomes available and the UBAQ BPM is triggered.
image

The “Select Job” field is a UD08 field that doesn’t actually ever get updated anywhere.

I started with using code to “Select all” :

And I thought this post resolved it at first:

But I haven’t been able to get the dashboard to allow a save after using “Select All”; “Save” remains greyed out:
image

I’ve added a MessageBox and tried with both RowMod = “U” and RowMod = “P”, and it appears to have made the change:

image

And I’ve added a call to the dataView representing the publishing query RowMod as well.

Any thoughts?

	public void ChangeAll(RowsCollection row, bool checkBoxValue	)
		{
			try
			{
				//EpiDataView edvTFJob = (EpiDataView)(oTrans.EpiDataViews["V_SF_TFDtlQuickJobUploader_1View"]);
				
				if(edvV_SF_TFDtlQuickJobUploader_1View.dataView.Count > 0)
				{
					for(int i = 0; i < edvV_SF_TFDtlQuickJobUploader_1View.dataView.Count; i++)
					{
						edvV_SF_TFDtlQuickJobUploader_1View.dataView[i].BeginEdit();
						edvV_SF_TFDtlQuickJobUploader_1View.dataView[i]["Calculated_SelectJob"] = checkBoxValue;
						edvV_SF_TFDtlQuickJobUploader_1View.dataView[i]["RowMod"] = "U";
						edvV_SF_TFDtlQuickJobUploader_1View.dataView[i].EndEdit();
						
						dbg += edvV_SF_TFDtlQuickJobUploader_1View.dataView[i]["Calculated_JobNum"].ToString() + nl
												+ "Job " + edvV_SF_TFDtlQuickJobUploader_1View.dataView[i]["Calculated_SelectJob"].ToString() + nl
												+ "RowMod " + edvV_SF_TFDtlQuickJobUploader_1View.dataView[i]["RowMod"].ToString() + nl;
												
					}
					V_SF_TFHeaderLookup_1View.dataView[0].BeginEdit();
					V_SF_TFHeaderLookup_1View.dataView[0]["RowMod"] = "U";
					V_SF_TFHeaderLookup_1View.dataView[0].EndEdit();
					MessageBox.Show(dbg);
					
					oTrans.NotifyAll();
					oTrans.Update();

				}

			}catch (Exception ex)
			{
				dbg += ex.Message + nl;
			}finally
			{
				Ice.Lib.Framework.EventLog.Current.WriteEntry(dbg);
			}

		}


	private void btnUnSelectAll_Click(object sender, System.EventArgs args)
	{
		ChangeAll(grdTFJob.Rows, false);
		
	}

	private void btnSelectAll_Click(object sender, System.EventArgs args)
	{
		ChangeAll(grdTFJob.Rows, true);
		
	}

I stuck the last oTrans.Update() in there just to see if I could force it to save.

2 Likes

I’m assuming you made sure your grid was Updatable?

yup:

And

But I also realize looking it up that I didn’t actually use a UD08 checkbox field, just a calculated checkbox field.

Not a problem as long as it’s marked for update in the baq.

Is Allow Multiple Row Update checked in your BAQ?

Yes exactly, and it works fine if the user selects it one row at a time

image

Uncheck Force Update On All Rows on Save and see what happens.

nope.
image

But strangely:

image

but clicking yes did not trigger BPM.Update()

I’m thinking I’ll have to go to a custom action in the UBAQ; but then I’ll have to educate and/or control users who are used to clicking save in other tools.

Surely there’s a way to force a dashboard to consider itself unsaved?

I notice in the object explorer RowMod is read-only; is there another property that can be set ?

I just figured out that if I use my “Select All” button and then select a row, the Save button appears and works.

Does anyone know how to programatically select a row?

Well what the heck.

Sure enough, if I set the row to selected = true, the “Save” button activates and calls update() the way some cruel Elder Epicorean intended.

1 Like