that |
Advanced Member |
|
AT |
|
|
None Specified |
|
Friday, June 16, 2006 |
Tuesday, February 27, 2024 12:38:29 PM |
486 [2.69% of all post / 0.07 posts per day] |
|
Use the substitute-missing function.
|
There's a "Show details" button in the error message box. The screenshot is from before pressing that button, so it is hard to say why it failed.
|
Most likely this means that the file was not found at the location given in the error message. The path separators are not the problem here.
|
One way would be to write your regex extraction in Java and include the .class file with MapForce:
https://www.altova.com/manual/en/mapforceenterprise/2023.2/mff_custom_func_java_example.html
If I remember correctly, such custom functions cannot return arrays, but you can return a string with a simple separator that you can then easily process in MapForce using the tokenize function.
|
This is a fun one: The worksheet in v1.xlsx is named "Sheet1 ", and in v2.xlsx it is "Sheet1". Note the trailing space. So your mapping expects "Sheet1 ", does not find that sheet in v2.xlsx, and returns no rows.
I didn't even know that Excel allows such names.
|
You need the group-by function from Rows to Order. Your key is obviously PO_Number, which you can also connect on the output side. Then connect Rows again to Line_Item, as well as the children of Line_Item.
The tricky part may be Season and Exit_Factory_Date, since there may be multiple values of those for each group. If you want only one of these per Order and you are sure that they are all the same, just use the first-items function to avoid duplicates.
|
eeaglehouse wrote:After 11 years, this behavior still hasn't been fixed or documented. I ran into this problem again and found my own post. The misbehavior of logical functions must really be added to the documentation because they are not working as currently documented!
Quote from https://www.altova.com/manual/Mapforce/mapforceenterprise/mff_lib_core_logical.html :
Quote:Note: Logical functions cannot be used to test the existence of null values. If you supply a null value as an argument to a logical function, it returns a null value. For more information about handling null values, see Nil Values / Nillable.
|
Connect both the CSV "Rows" node and JSON array item node ("{} object" in this case) to the corresponding XML parent elements that should repeat for each of those source records.
|
First, you need a JSON schema for your JSON content, otherwise MapForce cannot show you any useful tree nodes in your mapping. If you don't have a JSON schema and don't want to create one manually, you can create a sample file with representative JSON content of your CSV column and let XMLSpy or MapForce create a schema for you.
Then, you can insert a JSON component like you would for a regular JSON file. Click "Skip" when asked for a JSON input file. Then click the "File/String" button inside the component and choose "Parse Strings to JSON".
Now you have a JSON parsing component that you can simply add between your CSV column and the XML elements in the target.
|
You need to use a filter component. Mapping a boolean value directly to a segment will always create it.
|
|