Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe liveCycle Designer - Sort Table Content Using Javascript

Avatar

Avatar
Level 1
nitinsikka86
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
nitinsikka86
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
nitinsikka86
Level 1

03-12-2017

Hello Gurus,

I need an urgent help here.

I am doing form development on SAP business By design and I dont have the access to backend data. So, I have to do everything in javascript.

The requirement is to sort the content of the table to be printed and then we need to add sub-total row after a set of items end.

So something like this.

  

Document #Item #Amount
10011100
10012200
10013300
Subtotal 600
10021100
10022100
10023300
Subtotal 500

Now, in the 1st script I have written a logic to loop on the table

- Compare current and next entry. Swap if 1st>2nd. (I am just replacing the content of rows at index 1 and 2)

- Now I get a sorted table.

- On the sorted table I have written script to add amount field but I found that in the second loop (it is iterating on unsorted data)

which means that content was not bounded to node, it just changed at runtime. Although getting printed in the sorted manner.

Please help on this issue.

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

30-01-2019

Hi, still seems to be there, should be http://blogs.adobe.com/formfeed/files/formfeed/Samples/SalesReport.pdf  Bruce

Avatar

Avatar
Level 1
edwintiscareno
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
edwintiscareno
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
edwintiscareno
Level 1

30-01-2019

Hi Bruce, I need to Sort Subforms, I already read the blog you mentioned, but i could download the example, Do you have it?

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

04-12-2017

Hi,

There is a sample on John Brinkman's blog, Sort Subforms , this is for sorting subforms, but a table row is really a subform.

Regards

Bruce