Skip to main content
Version: 2.0
info

You are currently viewing documentation for CompuTec ProcessForce 2.0, which is still supported.

We recommend upgrading to CompuTec ProcessForce 3.0, which is a plugin installed and managed through CompuTec AppEngine 3.0, built on .NET 8.

However, please note that CompuTec AppEngine 3.0 has a different architecture, and all CompuTec components, including the CompuTec ProcessForce 3.0 plugin, need to be updated together to ensure full compatibility.

Before starting your installation or upgrade process, we strongly recommend reviewing the CompuTec AppEngine 3.0 and CompuTec ProcessForce 3.0 documentation.

User Defined Fields in PowerShell Scripts

When working with CompuTec ProcessForce objects in PowerShell scripts, you may need to assign values to User Defined Fields (UDFs). This guide explains the correct syntax and best practices for setting UDF values, ensuring proper data handling and script execution.


General Rule

To assign a value to a User Defined Field in CompuTec ProcessForce object, use the following syntax:

$PFObject.UDFItems.Item("U_UDF1").Value =  'some value';

Therefore instead of (example for U_LineNo field on Manufacturing Order's header):

$mo.U_LineNo = $csvItem.LineNo

It should be:

$mo.UDFItems.Item("U_LineNo").Value = $csvItem.LineNo

The same pattern applies to all the other User Defined Fields (UDFs).

Hour Type User Defined Fields

If a UDF represents time values (Hour type), you must explicitly convert the value from the .csv file to DateTime format.

For example, if the .csv file contains a time value in the HH:MM format, you should cast it as follows:

$mo.UDFItems.Item("U_PlannedHours").Value = [datetime] $csvItem.PlannedHours