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.
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:
I’ve added a MessageBox and tried with both RowMod = “U” and RowMod = “P”, and it appears to have made the change:
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.