Apostrophe Systems EPC Generator 2.0

EPCBase.SetFieldValue Method 

Gets the Value of an EPC Code field

public void SetFieldValue(
   string fieldName,
   string val
);

Parameters

fieldName
Name of the EPC Field
val
Value to put in the EPC Field

Exceptions

Exception Type Condition
EPCException Will throw this exception if an exception occurs while setting the field value

Example

This example shows how to set the company prefix value after parsing an EPC Number.

//Parse the EPC Number
 SGLN parsedSGLN = (SGLN)EPCBase.Parse("0920008181C80001");
//Because the EPC Number: 0920008181C80001 will contain a company prefix index and not a company prefix, you will need to add the company prefix here
//to have access to the ToPureIdentity() method.
parsedSGLN.SetFieldValue("CompanyPrefix","0652642");
You can set any field of the EPC Number using this method. To Get a list of available fields see the Fields property.

See Also

EPCBase Class | Apostrophe.EPC Namespace