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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Script / calculate subtotal of Amount during process (item line in desing view) and display it at the bottom of masterpage before continue to the others pages

Avatar

Level 1

Dear All ,

 

I'm facing an issue and I dont know how to do without use Script .
Unfortunatly, I don't know how to build a SCRIPT into the form .
Here the purpose of my request :

I have to display an invoice.
at the bottom of each Master Page

If invoice has only one page , I need to display a subform (S1) with several data as total amount, VAt .... etc !!!!
in case of several page, the previous subform ( S1 ) is replaced by S2 to display only one information.
this information is corresponding to the subtotal of Amount red into the Design View (Table-DATA -KWERT ) into the main area. .

One page or last page : display S1

Subform S1 bottom MP.png

Intermediate pages : Display Subtotal calculated: ( Sum of each Amount read in the current page) :

   Subform S2 bottom MP.png

I think I have to do at least , 2 things:
First : create a var ( SubT_Calculate) , calculating the Sum of amount during reading of data of each row .
Second : check if I'm in last page or not.

 

in this case ( not in last page)  :

-  have to hide S1 using a script  ,

-  get Var'value calculated and Display it in S2   .

 

If this possible ?

If possible ,  could you help to find solution to fix this issue, please ?

thank you so much for all help you could provide me.

best regards,

Take Care of you and your Familly .

Best regards,

Sebastien

 

 

0 Replies

Avatar

Employee

Hi, this looks like a rather complex form. I do not have the time to recreate a sample which comes close to yours just by looking here. If you send me a link to your form as a PM I can have a look at it and make suggestions.

Avatar

Level 1

Hello @Kosta_Prokopiu1 ,

firstable , thank you about your answer. I'll try to extract the XMl in Adobe life cycle locally .

the reason is I can't send you a link cause the Form is created in SAP.

thank you again for your help.

Have a good day .

Best regards , Séb.

Avatar

Employee
Sum can be used for anything in dynamic subforms. If you have subformdyn with n instances and a field numericvalue in it then you can sum it with Sum(subformdyn[*].numericvalue). The path to the variable must be correct.

Avatar

Level 1
I have the same problem but not that complicated. So do anyone know how to subtotal only one field value in subform? I only found sum which only used for table but I didn't found functions for subtotal a field in subform. If possible can anyone give me a simple sample for the function of subtotal? (I am just a poor business consultant who was trying to code in Adobe, so this request may seems **bleep**) Very appreciate. Thanks!

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now