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: Marcus.T
About
User Name: Marcus.T
Forum Rank: Member
Real Name:
Location Sweden
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Wednesday, January 28, 2015
Last Visit: Saturday, January 22, 2022 9:32:44 PM
Number of Posts: 24
[0.13% of all post / 0.01 posts per day]
Avatar
Last 10 Posts
Topic: Calculate ammount over several rows in .csv Then sort them
Posted: Saturday, January 22, 2022 8:55:32 PM
Hi,
So i am stuck at this problem that i first thought was no big deal.

The case, the customer will send us a .CSV file that contains several rows for each object.
Looks something like this:

ID;NAME;AMMOUNT
0001;Marcus;8
0001;Marcus;8
0001;Marcus;8
0002;Marguel;24
0003;Anna;8
0003;Anna;8
0004;Pavel;64

So, any total value from "Ammount" on each "ID" that is not over 20, have to be sorted to file 1,
If it is or is over 20, then sorted to file 2.

In both cases, we cannot merge the rows, the rows needs to be visible just like in the example.

The "Sum" function with grouped ID seems to work untill you have to sort the post to file 1 and 2.
Then it seems like the sum cannot group these post anymore.

I have tried so many many takes on this... Anyone?


*edit*
Whats up with this forum? Its like a relic from 2003. You are a tech company, get something updated :-D
Topic: Dark Theme
Posted: Wednesday, October 6, 2021 4:23:30 PM
Ok now the Altova products is the ONLY applications on my computer that do not support dark theme. Firing up XML-spy or mapforce while sitting on my cozy dark desktop is just torture! Please do something!
Topic: Dark Theme
Posted: Tuesday, June 9, 2020 11:57:28 AM
Hi,
This should be a high prio in my opinion.
We need a dark theme in xmlspy and mapforce.

The bright theme is killing my eyes!

Please
Topic: Need custom text in attribute at bottom of a sequence, how do i do it?
Posted: Saturday, November 30, 2019 6:08:35 PM
Solved it with "Add Duplicate Input After"
Topic: Need custom text in attribute at bottom of a sequence, how do i do it?
Posted: Saturday, November 30, 2019 5:14:58 PM
I´m stuck with a problem.
So, i have this case where i generate some rows that will be used on an invoice.
And i want to add a custom text at the bottom of the rows, like the example below.

The rows can be at different number.


Input file
<InvoiceHeader InvoiceCustomerNo="1111" InvoiceDate="2019-11-27">
<InvoiceRow CustomerRowNo="1" RowDescription="Item 1"/>
<InvoiceRow CustomerRowNo="2" RowDescription="Item 2"/>
<InvoiceRow CustomerRowNo="3" RowDescription="Item 3"/>
<InvoiceRow CustomerRowNo="4" RowDescription="Item 4"/>
</InvoiceHeader>
<InvoiceHeader InvoiceCustomerNo="1111" InvoiceDate="2019-11-27">
<InvoiceRow CustomerRowNo="1" RowDescription="Item 1"/>
<InvoiceRow CustomerRowNo="2" RowDescription="Item 2"/>
</InvoiceHeader>


Output file:
<InvoiceHeader InvoiceCustomerNo="1111" InvoiceDate="2019-11-27">
<InvoiceRow CustomerRowNo="1" RowDescription="Item 1"/>
<InvoiceRow CustomerRowNo="2" RowDescription="Item 2"/>
<InvoiceRow CustomerRowNo="3" RowDescription="Item 3"/>
<InvoiceRow CustomerRowNo="4" RowDescription="Item 4"/>
<InvoiceRow CustomerRowNo="5" RowDescription="Custom text at bottom"/>
</InvoiceHeader>
<InvoiceHeader InvoiceCustomerNo="1111" InvoiceDate="2019-11-27">
<InvoiceRow CustomerRowNo="1" RowDescription="Item 1"/>
<InvoiceRow CustomerRowNo="2" RowDescription="Item 2"/>
<InvoiceRow CustomerRowNo="5" RowDescription="Custom text at bottom"/>
</InvoiceHeader>
Topic: Stuck with line break in string, .json to .XML
Posted: Monday, October 7, 2019 7:52:36 PM
that wrote:
Don't confuse char-from-code and code-from-char.

How sloppy of me!
Thanks got it working now.
Topic: Stuck with line break in string, .json to .XML
Posted: Monday, October 7, 2019 2:31:17 PM
that wrote:
substring-before with char-from-code(10) works fine in my quick test to extract the first line.


Thanks for trying it out. It did not work here tho.
It will separate the string when it fins the number "4"

Example:

original string: "the time is now 22:49 sir"
string with your setup "the time is now 22:"

The code-from-char translates input "10" to value "49"

Am i missing something?
Topic: Stuck with line break in string, .json to .XML
Posted: Sunday, October 6, 2019 1:18:33 PM
Hello, fellow map forces!

I'm currently struggling with a really simple thing I want to execute on a mapping.

I have a .json file that is mapped into a regular .xml
One string in the .json file have a text with a line break code "\n".
That code is translated to the .xml as a "&#xa;"

I want to separate the text where this code is present and have tried to do so with the "substring before"
The problem is that may force does not seem to find the code. I have tried: "\n", "&#xa;", and char-from-code with both in ASCII.
I have tried connecting the substring-before with a tokenize-regexp. With no avail...

the string looks like this:
.json: text text text\ntext text text
.xml: text text text&#xa;text text


Any ideas what's happening?


Topic: Stuck with ID that has to repeat once
Posted: Wednesday, July 17, 2019 12:29:30 AM
Ok Hi!
So, i have generated a mapping that will be used in MAYA to create a 3d dungeon.
Tho, i have run into a problem i cannot solve...
I would like the First ID, the one with a "1" after _ and before __ , to repeat itself after the last ID in the group.
See example:
Is it possible?

Now it looks like this:
<node id="1_1__1" lat="1.0010000" lon="1.0000000"/>
<node id="1_2__2" lat="1.0000000" lon="1.0000000"/>
<node id="1_3__3" lat="1.0000000" lon="1.0010000"/>
<node id="1_4__4" lat="1.0010000" lon="1.0010000"/>
<node id="2_1__5" lat="1.0010000" lon="1.0000000"/>
<node id="2_2__6" lat="1.0000000" lon="1.0000000"/>
<node id="2_3__7" lat="1.0000000" lon="1.0010000"/>
<node id="2_4__8" lat="1.0010000" lon="1.0010000"/>
<node id="3_1__9" lat="1.0010000" lon="1.0000000"/>
<node id="3_2__10" lat="1.0000000" lon="1.0000000"/>
<node id="3_3__11" lat="1.0000000" lon="1.0010000"/>
<node id="3_4__12" lat="1.0010000" lon="1.0010000"/>
<node id="4_1__13" lat="1.0010000" lon="1.0000000"/>
<node id="4_2__14" lat="1.0000000" lon="1.0000000"/>
<node id="4_3__15" lat="1.0000000" lon="1.0010000"/>
<node id="4_4__16" lat="1.0010000" lon="1.0010000"/>
<node id="5_1__17" lat="1.0010000" lon="1.0000000"/>
<node id="5_2__18" lat="1.0000000" lon="1.0000000"/>
<node id="5_3__19" lat="1.0000000" lon="1.0010000"/>
<node id="5_4__20" lat="1.0010000" lon="1.0010000"/>
<node id="6_1__21" lat="1.0010000" lon="1.0000000"/>
<node id="6_2__22" lat="1.0000000" lon="1.0000000"/>
<node id="6_3__23" lat="1.0000000" lon="1.0010000"/>
<node id="6_4__24" lat="1.0010000" lon="1.0010000"/>
<node id="7_1__25" lat="1.0010000" lon="1.0000000"/>
<node id="7_2__26" lat="1.0000000" lon="1.0000000"/>
<node id="7_3__27" lat="1.0000000" lon="1.0010000"/>
<node id="7_4__28" lat="1.0010000" lon="1.0010000"/>
<node id="8_1__29" lat="1.0010000" lon="1.0000000"/>
<node id="8_2__30" lat="1.0000000" lon="1.0000000"/>
<node id="8_3__31" lat="1.0000000" lon="1.0010000"/>
<node id="8_4__32" lat="1.0010000" lon="1.0010000"/>
<node id="9_1__33" lat="1.0010000" lon="1.0000000"/>
<node id="9_2__34" lat="1.0000000" lon="1.0000000"/>
<node id="9_3__35" lat="1.0000000" lon="1.0010000"/>
<node id="9_4__36" lat="1.0010000" lon="1.0010000"/>


I would like it to look like this:
<node id="1_1__1" lat="1.0010000" lon="1.0000000"/>
<node id="1_2__2" lat="1.0000000" lon="1.0000000"/>
<node id="1_3__3" lat="1.0000000" lon="1.0010000"/>
<node id="1_4__4" lat="1.0010000" lon="1.0010000"/>
<node id="1_1__1" lat="1.0010000" lon="1.0000000"/>

<node id="2_1__5" lat="1.0010000" lon="1.0000000"/>
<node id="2_2__6" lat="1.0000000" lon="1.0000000"/>
<node id="2_3__7" lat="1.0000000" lon="1.0010000"/>
<node id="2_4__8" lat="1.0010000" lon="1.0010000"/>
<node id="2_1__5" lat="1.0010000" lon="1.0000000"/>

<node id="3_1__9" lat="1.0010000" lon="1.0000000"/>
<node id="3_2__10" lat="1.0000000" lon="1.0000000"/>
<node id="3_3__11" lat="1.0000000" lon="1.0010000"/>
<node id="3_4__12" lat="1.0010000" lon="1.0010000"/>
<node id="3_1__9" lat="1.0010000" lon="1.0000000"/>

<node id="4_1__13" lat="1.0010000" lon="1.0000000"/>
<node id="4_2__14" lat="1.0000000" lon="1.0000000"/>
<node id="4_3__15" lat="1.0000000" lon="1.0010000"/>
<node id="4_4__16" lat="1.0010000" lon="1.0010000"/>
<node id="4_1__13" lat="1.0010000" lon="1.0000000"/>

<node id="5_1__17" lat="1.0010000" lon="1.0000000"/>
<node id="5_2__18" lat="1.0000000" lon="1.0000000"/>
<node id="5_3__19" lat="1.0000000" lon="1.0010000"/>
<node id="5_4__20" lat="1.0010000" lon="1.0010000"/>
<node id="5_1__17" lat="1.0010000" lon="1.0000000"/>

<node id="6_1__21" lat="1.0010000" lon="1.0000000"/>
<node id="6_2__22" lat="1.0000000" lon="1.0000000"/>
<node id="6_3__23" lat="1.0000000" lon="1.0010000"/>
<node id="6_4__24" lat="1.0010000" lon="1.0010000"/>
<node id="6_1__21" lat="1.0010000" lon="1.0000000"/>

<node id="7_1__25" lat="1.0010000" lon="1.0000000"/>
<node id="7_2__26" lat="1.0000000" lon="1.0000000"/>
<node id="7_3__27" lat="1.0000000" lon="1.0010000"/>
<node id="7_4__28" lat="1.0010000" lon="1.0010000"/>
<node id="7_1__25" lat="1.0010000" lon="1.0000000"/>

<node id="8_1__29" lat="1.0010000" lon="1.0000000"/>
<node id="8_2__30" lat="1.0000000" lon="1.0000000"/>
<node id="8_3__31" lat="1.0000000" lon="1.0010000"/>
<node id="8_4__32" lat="1.0010000" lon="1.0010000"/>
<node id="8_1__29" lat="1.0010000" lon="1.0000000"/>

<node id="9_1__33" lat="1.0010000" lon="1.0000000"/>
<node id="9_2__34" lat="1.0000000" lon="1.0000000"/>
<node id="9_3__35" lat="1.0000000" lon="1.0010000"/>
<node id="9_4__36" lat="1.0010000" lon="1.0010000"/>
<node id="9_1__33" lat="1.0010000" lon="1.0000000"/>
Topic: Stuck, Need the ID´s to loop the right way
Posted: Saturday, June 29, 2019 11:37:49 PM
Ok, i solved like in the image below.
But i still can't understand how the auto-number lives it´s own life when using together with sequences.
Can someone please explain?


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