IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: that
About
User Name: that
Forum Rank: Advanced Member
Real Name:
Location AT
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Friday, June 16, 2006
Last Visit: Tuesday, February 27, 2024 12:38:29 PM
Number of Posts: 486
[2.69% of all post / 0.07 posts per day]
Avatar
Last 10 Posts
Topic: Mapping empty cells
Posted: Tuesday, February 27, 2024 12:38:29 PM
Use the substitute-missing function.
Topic: Where on a field with Parenthesis
Posted: Monday, January 8, 2024 1:11:06 PM
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.
Topic: I/O Error
Posted: Friday, October 20, 2023 12:55:53 PM
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.
Topic: Extract sub string by regex
Posted: Wednesday, July 12, 2023 11:38:23 AM
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.
Topic: Excel Spreadsheet with Dates/Times
Posted: Wednesday, June 21, 2023 1:15:08 PM
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.
Topic: CSV to nested XML
Posted: Tuesday, May 23, 2023 11:57:49 AM
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.
Topic: How do logical functions handle null input?
Posted: Thursday, March 2, 2023 12:14:33 PM
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.

Topic: JSON fields in CSV - Mapping to XML
Posted: Tuesday, January 24, 2023 2:43:18 PM
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.
Topic: JSON fields in CSV - Mapping to XML
Posted: Monday, January 23, 2023 6:20:36 PM
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.
Topic: Contitionally create EDI Segment
Posted: Tuesday, July 12, 2022 12:29:26 PM
You need to use a filter component. Mapping a boolean value directly to a segment will always create it.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.