I have a BPM that will call an inspection data form when the process button is pressed. I want to grab the part number of the record being processed so I can provide a link to the drawing in the form for the user to click. How would I retrieve that in the data form customization script editor?
@jboyette I think this thread on lfo should get you going.
The other option would be setting a BPM context field to the input value then retrieve/process that on the opening of the form. It’s not quite as robust in that sequence/timing can result in the wrong value being retrieved/used if the processing order isn’t as fixed but it’s a very simple/easy option.
Thanks for the link Greg. I dont think I ever would have stumbled on to that thread. Been searching for days for something that might work. That is very useful functionality that will come in handy. Much appreciated! I will have to play around with this some. I think it might work but might have to restructure some things.
I currently use a post process BPM to launch the data form Looks like the ProcessCaller.LaunchFrom() code could replaced that. But a part of the bpm data form launch is applying a customization for the form. Does the ProcessCaller.LaunchFrom() function have an argument to pass the customization?
Thanks for the reply Callum. Could you illustrate how to do that? I think that’s ultimately what I need. I know how to retrieve bpm context data within a BPM using custom c# code but not how to do it in the c# form customization code. Form my understanding the bpm is server side and form customization is client side so dont behave the same way
((EpiDataView)oTrans.EpiDataViews[“CallContextBpmData”]).dataView.Table.Rows[“CheckBox01”] = true;
I think is the basic syntax to set the value. It’s been a while since I’ve had to.
@jboyette There is process caller maintenance that adds a menu entry in the process section and you can add a customization once the entry exists, but I have never done a bpm form, so I don’t know exactly how that would work.
@Callum_Stott - thanks for the code. I got it working with that piece with a tweak. Appears if you set the callContextBPM fields in a BPM the data goes into a “BPMData” epidataview instead of “CallContextBmpData”. Screen shot below of what I ended up doing if this helps anyone in the future that might stumble on the thread.