Conditional Break in subform javascript
I would like to have the blue button at the bottom of my form (which adds a new instance of a subform) have all repeated instances of the subform AFTER the first page, start at the top of a new page. I can’t seem to get the JavaScript correct, but I am not even sure I have the right syntax for the subform reference. Attached is my form without any of my botched attempts. If anyone could take a look and help, I’d really appreciate it.
TIA
Shared Files - Acrobat.com
In case this helps someone else, what I did was add an empty 0" height subform, with Pagination placement of “Top of Next Page”, set the visibility of it to hidden and added an action on my button that changed that empty subform to visible when clicked. This accomplishes the goal of adding this new subform instance to the top of the next page without messing up the subform within this subform placment otherwise.
Similar Messages
-
Hello all,
I am currently working on a form that has a fixed layout, meaning everything is placed in a Positioned subform. I have to do this because at the bottom of the page there is a table that lists approvers of the form. The aprovers need to provide a digital signature (meaning the table cannot be a part of the master page) and I do not want the approvals table to repeat on subsequent pages.
Now for the problem.
Above my approvals table I have a table with a repeatable row so that users can add and remove rows as necessary. This table is in a flowed subform and works perfectly, and I have set a max # of row instances to prevent the two tables from overlapping. However, I need to be able to set the text fields in this table to expand to fit, so that when users have a lot of text to enter they can do so. This causes the tables to overlap if the user enters too much text in too many rows.
I am looking to either create a conditional break or a script of some sort that can evaluate the height of my expanding table and create a page break when it reaches a certain height in order to prevent overlap with the approvals table below it.
I apologize for the difficulty of the question and I appreciate any help that I can get.
-AlexCheck the following thread for looping over a table --> Read Table Java script
Then as specified in the thread in the "for" loop of Table write an "if" condition for the 1st column to check whether it is "A" or "B".
if ( xfa.resolveNode("data.tablesubform.table1.row["+i+"].column1").rawValue == "A" )
HeaderField.rawValue = "ANGRY";
else if ( xfa.resolveNode("data.tablesubform.table1.row["+i+"].column1").rawValue == "B" )
HeaderField.rawValue = "BETTER";
I have not checked this but see if it helps.
Chintan -
Conditional breaks in nested table
Hi Experts,
I have static table and inside it there a row with flowed subform and other binded table , in the inner table I want to set
conditional break on one field , I have it to put it in the row that contain a table ?? how can I access the field of
inner table from the row of the outer table???
thanks in advanceHi,
You can access the field of the inner table from row of the outer table using following script:
data.page1.TableOuter.Row1.TableInner.Row1.cell1.rawValue;
Thanks,
Radhika -
Adobe Forms - Page Break via a Conditional Break
Having read through the forum I am getting the impression that Page Breaks is a bit of a problem.
I can enforce a page break between datasets by setting "After:" to "Goto Next Page", on the Object->Pagination tab, however this results in a blank page at the end of the entire output which is just the Master Page with all the static elements.
The 'Conditional Breaks' sounds like the logical point to force a page break based on a combination of inequality or if a particular data element equals a known value.
However, I don't seem to be able to get the 'Conditional Break' to work.
So, the question I would like to ask, is how can you tell if the conditional break logic is correct and whether or not it is running? For example on an ABAP system is it possible to run it and debug it?
My attempts at getting the break to open a pop up or write to disk via JavaScript fails, which is leading me to think they are being ignored by the Adobe Form at both the server and client level.
Is it possible that I have missed another setting somewhere else in the Adobe form configuration?Hello Jason!
You are right that conditions (and all scripting) are bit tricky in this solution. Still they work.
Debugging of AIF at ABAP side is not possible due to the architecture of the solution - from the ABAP POV it is just a web-service call and receiving result (PDF) back. You can't stop it on midpoint or intercept it somehow.
At the same time there are other ways to check it.
First, you can enable trace and saving additional info in SFP transaction under Utilities -> Settings.
Details see [here|http://help.sap.com/saphelp_nw70/helpdata/EN/f7/a04aee0cb94978a011401311efe603/frameset.htm]
And the nice way to check if your condition block is taken into the account is simple check like 1 = 2.
If this works and you receive page break than all you need is find errors in your condition syntax, otherwise the problem is somewhere else.
Regards,
Petr Perstnev -
Hi Experts,
I am working on conditoinal breaks in adobe.
My requirement is: For a delivery item if i have 3 batched i have to print 3 forms with item data. Here the data of one batch can flow into multiple pages I had applied a conditional break on batch field at the item level of the table(designed with dragging the table into the layout.). this form contains Batch at header and footer. When the data fits in one page conditional breaks are working fine and i am getting 3 forms in the same spool as desired. But when there is more item data conditional breaks are not working properly.
Issue like item data over flow on the footer and batches are not showing up properly according to the page breaks.
Please help on this issue.
Thanks,
AnilGuys, Tell me if my question was not clear or need further information.
-
Conditional Breaks on subnodes/item level
Hello experts,
We have a requirement for a new Adobe Form, which has a header table and an item table. We have to print multiple documents in 1 printout.
Our Adobe Form context layout is as follows:
- Context node for the Header (1 record for each document)
- Subnode with the item information ( WHERE conditions are set to the specific document key, so we only have the relevant items of the document in the loop )
We have added a Pagination -> Conditional Break based on the header table key, to trigger a new page break for each document.
But we have a 2nd requirement where we need to trigger a 2nd conditional break based on an item partner difference.
This means we would have to add a conditional break, on the subnode which contains all the item information.
In Adobe Forms, according to our finds, it does not seem possible to trigger a condition break in a subnode/item table, is this correct?
Is it nescecary to bring all the conditional break fields to the header table?
The requirement wants this layout:
- Document 1
- ITEM PARTNER A
- Item 1 partner A
- Item 2 partner A
( TRIGGER ANOTHER BREAK for new Item Partner display ) <- The issue
- ITEM PARTNER B
- Item 3 partner B
( PAGE BREAK TRIGGERED ) <- OK
- Document 2
We were wondering what the most proper/clean/best practice way is, to achieve this requirement.
( without having to duplicate records on the header table, by means of moving the required field from the item table to the header table )
Thx
Kind regards,
WouterHi Wouter,
Thanks for your response yes its not possible to achive this in nested table. I achieved my output using below logic by duplicating records and using Java script..
http://scn.sap.com/thread/3702677
Regards,
Manu -
Adobe form conditional breaks with subtotal
Hi,
I need to develop a form with a dynamic table that calculate a subtotal by company
Eg:
Reference Cash disc. Withh.tax Net loc. curr. CoCd
0 0 10 Z001
TESTE 1 0 0 20 Z001
TESTE 1 0 0 20 Z001
Subtotal 40
CNRWaeoitftsCh ehldhor e.cdtn.ai sccxce u.rr.
TESTE 3 0 0 30 Z002
TESTE 3 0 0 30 Z002
TESTE 3 0 0 30 Z002
90
I can set the conditional break by company but i can calculate the subtotal.
Thank you in advance.
Miguel
Edited by: miglsilva on Dec 20, 2010 1:52 PMHi Sai,
Thank you very much for the reply,
I have to implement something like a dynamic table:
Imagine
I have one table with the purchase items of all the companies, like that:
XBLNR NETTO Company Code
TESTE 20 Z001
TESTE 20 Z001
TESTE 30 Z002
TESTE 30 Z002
TESTE 30 Z002
TESTE 60 Z003
TESTE 30 Z003
So i have to display that by company, and when finish the las item i have to add a line with the subtotal like that:
XBLNR NETTO Company Code
TESTE 20 Z001
TESTE 20 Z001
Subtotal 40
TESTE 30 Z002
TESTE 30 Z002
TESTE 30 Z002
Subtotal 90
TESTE 60 Z003
TESTE 30 Z003
subtotal 90
I had already the conditional break for break when the data[-1].bukrs ne data.bukrs but when i put the script for calculate the value the result it is all the items.
Thank you in advance.
Miguel -
Subtotal in trailer on conditional break (PDF Form)
A row put by conditional breaks as trailer ( with condition "Items[-1].VPROC ne Items.VPROC" for example).
How to calculate subtotal on some field in this row?
Any example?Hello,
the recommended solution is to do this in backend (add a row into the table of rows, add a column which will be hidden in the form, where there will be something like 'X' if the form is a subtotal, based on the 'X' mark you can change the row color for example). Or you can do that in the form using scripting but that is not very friendly.
Regards Otto
p.s.: note there is Adobe forms forum under NetWeaver -
Hi,
We use Adobe LiveCycle Designer ES2 9.0.1.0....
We have a form which can create one letter per PDF. Now we want several letters per PDF, all with the same address but with different items.
Problem
What we already tried is to have a conditional brake. With this items are written on master page 3. But master page 3 should only show up with no items on it, then an address again and only afterwards the next items should appear.
Our PDF should look like this:
letter 1----
Address
Item1
Item2
Additional Page (master page 3)
letter 2----
Address (same Address as above)
Item3
Item4
Additional Page
letter 3----
..and so on
Our data file xml contains the information for only one address and has the structure
Address
Items
-Item 1
-Item 2
-Item n
Our Form has the structure
Master page 1: Start of a letter.
Body section shall contain Address and Items
Master page 2: Overflow
Body section shall contain Items
Master page 3: Additional Page at the end of (nearly) every letter.
Body section shall contain Nothing.
Thanks and Regards
TobiasThe Problem is solved now:
1. The address has to be moved from the content area of the master page 1 to the master page 1 itself.
2. Two conditional breaks were added to the table which displays the items.
a. The first one has
-"To" = "Top of Master page 3" and
-"leader" = "(None) and
-"when" = the grouping condition for the items.
b. The second has
-"To" = "Top of Master page 1"
To avoid that items are printed onto the Master page 3, the height of the content was set to 1 mm. So this page only shows up but the next items immediately flow over to master page 1.
Regards
Tobias -
Remind conditional break data in header
Hi,
In my form, i'm displaying simple informations on my customers (1 line per customer). My data are stored in a table (each line corresponding to a customer). I group my customers by "domain", so i've made a conditional break on this data (line[-1].DOMAIN ne line.DOMAIN).
All is working correctly, but i need to remind this 'domain' on each page, in the header section, and i don't know how to do this. I have tried with script, but it doesn't work.
Thanks for your help.
Exemple :
Page 1 Domain : ???
Name1 / Adress1 / Domain1
Name2 / Adress2 / Domain1
Name3 / Adress3 / Domain1
Name4 / Adress4 / Domain1
Name5 / Adress5 / Domain1
-------------------------- conditional break
Page 2 Domain : ???
Name6 / Adress1 / Domain2
Name7 / Adress2 / Domain2CRM does have extractors which bring header and item data separetely.
For Eg: 0CRM_LEAD_H
0CRM_LEAD_I
0CRM_OPPT_H
0CRM_OPPT_I
If at all there is any Data Source related to an area in CRM which brings both the data together, then ofcourse the DSO and Cube will be designed to Support that.
Cheers,
Neel. -
How can I create a conditional break in webi ?
Hello Mister and Misses
Can somebody explain me how i can create a conditional break , because i want to limit the number of lines to 9 l ines in a bloc
each 9 lines I want to create a break
Thank you
example :
1 toto
2 titi
3 taa
4 tutu
5 papa
6 popo
7 tata
8 momo
9 mimi
(break)
10 mumu
17 maxe
18 fax
(break)
19..
My first column is not a dimension so, i can't manage to make a break
How is it possible to tranform a measure to a dimension in order to make a break on each 9 lines
thank youTien,
Try myFile.WriteText('\x0c'); instead of myFile.WriteText('\f');
Regards
Richard Stobart
-----Original Message-----
From: Wang, Tien [SMTP:[email protected]]
Sent: Friday, September 12, 1997 6:09 PM
To: Glen A. Whitbeck
Cc: forte-users; owner-forte-users
Subject: RE: How can I create a page break in a file?
Thank you, Glen. I tried WriteText. But it didn't work.
Tien Wang
Indus Consultancy Services
[email protected]
From: Glen A. Whitbeck
Sent: Thursday, September 11, 1997 11:59 AM
To: Wang, Tien
Cc: forte-users; owner-forte-users
Subject: Re: How can I create a page break in a file?
Instead of using "WriteLine," try using "WriteText" ("WriteLine" writes
TextData into an open file, while "WriteText" writes data to a stream)
like this:
<method 1>
myFile : file = new();
myFile.WriteText('\f');
Glen
Wang, Tien wrote:
Hi,
I am creating a text file for a report which contains multiple pages.
How can I create a page break in my file? I tried to use the
following
two methods, but neither of them works. Specifically, it seems a
special
character printed in the file. But when I print the file through a
WordPad, it didn't separate pages.
I am currently using version 3.0.C on Windows NT 4.0 with a HP Plus 4
printer. Any help will be greatly appreciated.
Tien Wang
Indus Consultancy Services
[email protected]
>
<method 1>
myFile : file = new();
file.writeLine('\f'); --- \f is the form feed in the C language
<method 2>
myFile : file = new();
j : IntegerData = new( value = 14 );
c : char = j.IntegerValue; -- c now contains ascii 14 (form feed)
p : pointer to char = &c; -- Set a pointer to the character
pageBreakTxt : TextData = new();
pageBreakTxt.Concat(p);
myfile.writeLine(pageBreakTxt); -
Adobe Form - How to set a condition for a Subform
Hi All
I am new in Adobe Form and learing it - (I had some knowledges of SmartForm) - One of the requirement I have to do is to print out a different layout (subform) according to a value of a flag.
In Smartform, I can draw diffrent layouts and put a condition on each layout so each one can be printed accroding to the flag value.
In Adobe Form, the subform (or any other object) cannot be conditional set - I don't know how to do it - Could comeone please show me how - I reward points for any reply - ThanksYou are excused with your English - and you must excuse mine , too
Your questions:
But, how i write the condition ?
1- If ( article.table1 = Null ) then ... ?
2- If ( article.table1.Rangée1.SubForm2.lib_article.rawValue = " " ) then... ?
Try this:
1- // Locate the table node from to down
var tNodes = xfa.resolveNodes("Table1[*]");
If (tNodes.value == NULL) {
tNodes.presence = "Hidden" }
or
2- // locate the varable fields and loop thru to check if they are all empty
var fNodes_1 = xfa.resolveNodes("article.table1.Rangée1[*].SubForm2.num_article");
var fNodes_2 = xfa.resolveNodes("article.table1.Rangée1[*].SubForm2.lib_article");
var fNodesLength = fNodes_2.length;
var table_empty = "Y";
for (var fNodeCount = 0; fNodeCount < fNodesLength; fNodeCount++) {
If (fNodes1.item(fNodeCount).rawValue <> " ") or
(fNodes2.item(fNodeCount).rawValue <> " ") {
table_empty = "N";
// Now find the table node and hide if if necc
var tNodes = xfa.resolveNodes("Table1[*]");
If table_empty = "Y" {
tNodes.presence = "Hidden" }
You must place those codes at the Subform Article level in Javascript mode
Good Luck
Edited by: Liem Van Duong on Jun 13, 2008 2:45 AM
Edited by: Liem Van Duong on Jun 13, 2008 2:46 AM -
Conditionally Displaying a Subform
Hello,
I am working on a LiveCycle Output form and have a subform which I conditionally need to display. It is an URGENT flag that displays on a memo, so it is set on whether or not the user set the memo to be urgent. I pass the urgent flag within the XML that is sent to LIveCycle. I created a Subform Set with the following code. The language is FormCalc:
URGENT == "Y"
I receive this error in the log:
Script failed (language is formcalc; context is xfa[0].datasets[0].data[0].ROOT[0].XML_WORKFILE[0])
script=URGENT == "Y"
Error: accessor 'URGENT' is unknown.
Malformed SOM expression: $.XML_WORKFILE.[URGENT == "Y"]
Error: accessor 'URGENT' is unknown.
Any ideas?
Thank you!
WendyI can't help with the xml side but your script syntax is off.
Two equals signs are for testing a value (in an if statement, etc.), if you are trying to assign a value use one equals sign.
The error "accessor unknown" is because it doesn't know what "URGENT" is - there is no object called "URGENT". -
How does conditional break work in adobe forms?
Hi,
I want to break a page depending on internal table contents.
How do we do it?
Basically for every new order number i need a pagebreak.
Rgds
Varaduplicate..
-
Hi,
I have 10 line items in a table. i would like to display first 5 line item in first page of Adobe form and remaining 5 line item in 2nd page of Adobe form. How to do that?Since i have more space in first page itself it is showing all the items in first page itself.
Any help is appreciated.You can achieve this by defining conditional breaks on subform.
Select the Subform and then goto Object tab, in this Pagination tab.
In Pagination tab, click on Edit and define the condition. And then you can select where your next data should go.
Regards
amit
Maybe you are looking for
-
Hi All, I am implementing several scenarios in XI. They are mainly dealing with RFC, JDBC adapter, file. The main communication is between SAP R/3 and Oracle via XI, both to and fro. Pls tell me what are the standard error handling mechanisms in XI.
-
Printer will not make the final connection to the network
HP Photosmart c4580 all in one printer link systems router using the HP add a device wizard, everything proceeds til the final install on the network. a big red X shows up with a message that it can't find the printer on the network this happens with
-
Java heap size....
Hi guys, i need absolutely your help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I use Exadel Studio with Eclipse and Server Tomcat 5.0 embedded. I need to enlarge Tomcat heap size. Can you help me? I've read many posts but i'm a bit confused. Does exists a gr
-
Multiple User Exits at Same point of the Same ABAP Program
Dear ABAPers, I, a Basis person, want to know if it's possible to have multiple User Exits at the same point of the same SAP ABAP program; and further if access to those exits can be controlled through authorization for different user groups, i.e. di
-
How do I make a site appear in the Permissions Manager?
I forbid all sites to set cookies. The sites where I have an account are the exceptions. I'm finding it hard to make a site appear in the Permissions Manager. I tried lots of things. Like placing a bookmark in a bookmark folder, creating a bookmark m