Need Help Using DataTools to add View of PartCost

I need to add PartCost Info to the PriceList Inquiry.
When I try to use these instructions from the below link, PartCost is not available to chose from.
Can anyone help me accomplish this?

AddField of Different Table

PartCost is not a primary key context Adapter so you won’t be able to do this with the FKV Data Tools.

You could do it adding a BAQDataView if you like! BAQ Data View - #10 by josecgomez

2 Likes

I’ll check that out!
Thank you!

If there are any Tutorials or Documentation that could help me do the BAQDataView, It would greatly be appreciated.

This one is about a different topic but it also uses a BAQDataView and I made a walk through video on how to do it.

1 Like

Thank You!

This works great Thank You!!
Rather than having a grid on the page, I created a text box and I am using the new BAQDataView to link to a single field in the row.

How can I change the format of my texbox that is using my BAQDataView?

Texbox%20Format

I would like the texboxt to view as 1,032.64 (Just as it does in the BAQ)

“Modify Extended Properties” doesn’t seem to work on the BAQDataView

Any thoughts on how I can format this?

Is this something simple that I am missing here?
How can I format this texbox?

This is a bit of a shot in the dark, but I think you can use the extended properties method, even if it doesn’t show up in the wizard. You’re baqview is going to have a view and a field, and that’s probably where the properties are coming from. So if it were me, I would use the wizard to make the code for extended properties on a similar field, then hijack that code and replace the view and field with the BAQ view that you added. I’m non 100% sure it would work, but that’s what I would try.

I can use the wizard to do get the Extended Properties auto-populated code

Here is my Extended Properties Code

		if (edvPartCostInfo.dataView.Table.Columns.Contains("Calculated_StdCost"))
		{
			// Begin Wizard Added ExtendedProperty Settings: edvPartCostInfo-Calculated_StdCost
			edvPartCostInfo.dataView.Table.Columns["Calculated_StdCost"].ExtendedProperties["Format"] = "->>>,>>9.99";
			// End Wizard Added ExtendedProperty Settings: edvPartCostInfo-Calculated_StdCost
		}

Here is my BAQDataView Code

CreatePartCostBAQView();

	}

	public void CreatePartCostBAQView()
 	{
	baqPartCost = new BAQDataView("PartCostInfo");
	oTrans.Add("PartCostInfo",baqPartCost);

	string pubBinding = "Part.PartNum";
	IPublisher pub = oTrans.GetPublisher(pubBinding);
	if(pub==null)
	{
	oTrans.PublishColumnChange(pubBinding, "MyCustomPublish");
	pub = oTrans.GetPublisher(pubBinding);
	}
     if(pub!=null)
	 baqPartCost.SubscribeToPublisher(pub.PublishName, "PartCost_PartNum");
    

	}	

How are you suggesting I change the Extended Properties?

Here are the errors I get after creating the Extended Properties.

error%202