Dynamic tables with data driven visibility of columns (XML).
Hi
I am trying to make a template in LiveCycle Designer (XDP) with a dynamic table, and with dynamic visibility of columns.
I want the column visibility to be driven by the xml input.
(There is no user input.)
I want the columns to visible in the table only if one or more of the rows has a data cell with value in a spesific column. If not the entire column should dissappear from the generated pdf.
If that is not possible, my alternative is so set a value in th XML file to hide a tables column. But how?
I have no problems of making dynamic tables, that is solved.
I only want to hide unused columns in a table, defined in the xml source file.
Can anyone help?
Borge
Hi,
The link is not working..
Please provide a valid link.
Similar Messages
-
How do I configure a dynamic table with Data-Drop Down selections to store separate values?
I am attempting to use LiveCycle to create an Order Form that uses an ODBC to a SQL database. When a user makes a selection, a separate column in the table references the "Item #" associated in the SQL table, and generates a corresponding barcode.
My problem is that when I select an Item from the drop down list, all the items in the table change. What am I missing here to separate the rows as different line items? I tried adding a [*] to the end of the connection string, and that allows me to select different options but does not generate the "Item #" or "Barcode" field.
The screenshot below shows the basic form. When I select any of the data drop downs, all of the Items change.
I used the auto generated script for the "Add Row +" button shown below. Is this my issue? Or do I need to alter the way I'm setting up the Data Binding in for my Data Drop Down?
this.resolveNode('Table1._Row1').addInstance(1);
if (xfa.host.version <8) {
xfa.form.recalculate(1); }package pruebadedates;
import java.sql.*;
* @author J?s?
public class ClaseDeDates {
/** Creates a new instance of ClaseDeDates */
* @param args the command line arguments
public static void main(String[] args) {
java.sql.Date aDate[] = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/pruebafechas", "root", "picardias");
if(!con.isClosed()){
stmt = con.createStatement();
stmt.executeQuery ("SELECT dates FROM datestable");
rs = stmt.getResultSet();
while (rs.next())
aDate[] = rs.getDate("dates");
catch(Exception e)
System.out.println(e);
//System.out.println(aDate);
}Hi, There is my code and the errors that I get are:
found : java.sql.Date
required: java.sql.Date[]
aDate = rs.getDate("dates");
Actually I have No idea as How to get a Result set into an ArrayList or Collection. Please tell me how to do this Dynamically. I have like 25 records in that Database table, but they will grow, so I would really appreciate to know the code to do this. I suspect my problem is in the bolded part of my code.
Thank you very much Sir. -
Dynamic Table with two columns
Hi!
i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
if the links r not visible in this case another links take it's place & fill the cell.
links/text is coming from database.
i am using Struts with JSP IDE netbeans
Please help me
BuntyIndiai wanna do something like this
<div class="box_d box_margin_right">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="0" end="${data.faqListSize/2-1}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
<div class="box_d">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="${data.faqListSize/2}" end="${data.faqListSize}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
wanna divide table in two columns....if one link got off due to condition other one take it's position...
I have created a textorderedlist
Bunty -
Fill dynamic internal table with data from another dynamic table
Hi,
I have a huge dynamic table with a few columns and need to fill another dynamic table with some of the columns, that are also existing in the other one. I first know at runtime, which fields the smaller table contains.
Until now, I did it that way:
LOOP AT <it_tab_structure> ASSIGNING <wa_tab_structure>.
LOOP AT lt_comp_full INTO ls_comp_full.
ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <structure> TO <column>.
ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <wa_tab_structure> TO <value>.
<column> = <value>.
ENDLOOP.
APPEND <structure> TO <table>.
ENDLOOP.
lt_comp_full contains the columns of the second table, that have to be filled.
This is taking a very long time, as there can be a lot of columns in the source table and the source table contains at least 100000 records.
Is there therefore any way to fill the other table faster?
Thank you & best regards,
MichaelHey Sharath,
thank you for your answer! Unfortunately I don't have a 7.4 system here, but your example pointed out, that I can also use move-corresponding from one structure to the other, which I thought, was not possible. I'm trying out, if this makes it faster now.
I'll let you all know, if this made the deal.
Thank you & best regards,
Michael & Arne -
Dynamic table with dynamic drop-down list values
Hi,
I need to display a dynamic table with 2 columns on an interactive form.
My Context is defined as below:
Root
StudentData 0..n
StudentName
StudentCourses 0..n
Text
Value
The 1st column should display student name, 2nd column should display student courses. The courses will be different for each student. I populated the context properly. I checked it by printing them. My DDL is bound to "Student Courses".
When there is one row -> The DDL is populated with the courses of student 1 (as there is only one).
When there are more rows -> The DDLs for all the students are populated with all the courses of all the students.
I want to see the data populated like:
TEXTFIELD DROP-DOWN LIST
Student 1------Student1-Course1
Student1-Course2
Student1-Course3
Student 2------Student2-Course1
Student2-Course2
Student2-Course3
I tried to do this in plain web dynpro using SVS.. it is also working similarly.
I have set the singleton property of nodes "StudentData" and "StudentCourses" to false.
Could any one tell me where I am going wrong?
Thanks
RamRam,
I'm not sure how much this will help, but I know I had the same problem as you when I tried to get a similar thing working, but I can't remember which of the many changes I made fixed the problem, so I'll just show you my code and perhaps you can see if anything is different than yours.
Here's where I'm creating my dropdown - in my case EastNew_RegOut is the same as your StudentData, and RateTypeDropValues is the same as your StudentCourses (the comments in the code are not meant to sound bossy to you, this is actually an example piece of code that other developers in my company "steal", so I have to put very specific instructions in there!):
int nodeSize = wdContext.nodeEastNew_RegOut().size();
for (int i = 0; i < nodeSize; i++) {
//create an element called "table", that's the element at i. So, basically it's a row. Maybe I should have
//called it "row" instead of table.
IPublicDeviceExchange.IEastNew_RegOutElement table = (IPublicDeviceExchange.IEastNew_RegOutElement)wdContext.nodeEastNew_RegOut().getElementAt(i);
//this line of code just executes an rfc that finds out what rates need to be in the dropdown for this particular row
executeRateTypeDropdown(rateCategory, table.getNum(), wdContext.currentEastNew_MeterOutElement().getReggrp());
//clear out what's already in there before we re-populate it.
table.nodeRateTypeDropValues().invalidate();
//now, I'm looping through all the values in the *actual* rate type dropdown (the one that's an RFC, populated by the above "execute" method)
for (int j = 0; j < wdContext.nodeEastRatetype_DropdownOut().size(); j++) {
//for each element in the *actual* Rate type dropdown, I'm going to create an element in my node that I created
//and set the values from the *actual* one as the values in my node.
IPublicDeviceExchange.IRateTypeDropValuesElement element = wdContext.createRateTypeDropValuesElement();
IPublicDeviceExchange.IEastRatetype_DropdownOutElement rateTypeOut = (IPublicDeviceExchange.IEastRatetype_DropdownOutElement)wdContext.nodeEastRatetype_DropdownOut().getElementAt(j);
element.setText(rateTypeOut.getText());
element.setValue(rateTypeOut.getRatetype());
//here's another key - notice how I don't say wdContext.nodeRateTypeDropValues() - it's the one that's
//directly off that table I created earlier - the thing that's essentially a row in my newReg table.
//So, what I'm doing here is adding that new element I created to the dropdown FOR THAT ROW!
//(btw, if you're trying to duplicate this, and this method does not exist for your "table" object, it's
//probably because you didn't listen to me above and you didn't create your node with the singleton property
//set to false.)
table.nodeRateTypeDropValues().addElement(element);
As for my layout... my table is bound to the EastNew_RegOut node, and the column with the dropdown is bound to RateTypeDropValues.Value (that's probably obvious, but there you have it anyway)
Finally, in my context, EastNew_RegOut is singleton = true (I was surprised about this, actually, I would have assumed it was false) with a selection of 0..1 and RateTypeDropValues has singleton set to false with a selection of 0..1
I hope that helps to some degree!
Jennifer -
Hello everybody,
im tried to create a dynamic table with cl_alv_table_create=>create_dynamic_table, but that doesnt work for the table i need. I need a table with a changing number of columns of type "type ref to CL_DD_INPUT_ELEMENT", but the fieldcat only takes normal Data-Types.
So my question is, is there any way to create a dynamic table or structure with components of type ref to CL_DD_INPUT_ELEMENT?
Thank you very much for any help.
CheersI generally use Factory methods of RTTS classes to create dynamic tables. Check my reply (Step 1) in this thread getting column headers dynamically from input parameters in alv..
-
Dynamic Table with Random Records
What I am trying to do is select random records from a table
and display them in a dynamic table with max columns set to 3 and
the 4th record to be on a new row. Below is what I have right now
and it works to randomly pick records but has no function to set
columns in a table. If there is an easier way feel free to let me
know. I have tried various ways to do this but none seem to work.
<CFQUERY NAME="getItems" DATASOURCE="absi">
SELECT catfit.*, modcats.*, prodmat.*, prod.* FROM catfit,
modcats,
prodmat, prod WHERE prodmat.prodid=catfit.prodid And
catfit.catid=modcats.catid
ORDER BY modl ASC </cfquery>
<cfif getItems.recordCount>
<cfset showNum = 3>
<cfif showNum gt getItems.recordCount>
<cfset showNum = getItems.recordCount>
</cfif>
<cfset itemList = "">
<cfloop from="1" to="#getItems.recordCount#"
index="i">
<cfset itemList = ListAppend(itemList, i)>
</cfloop>
<cfset randomItems = "">
<cfset itemCount = ListLen(itemList)>
<cfloop from="1" to="#itemCount#" index="i">
<cfset random = ListGetAt(itemList, RandRange(1,
itemCount))>
<cfset randomItems = ListAppend(randomItems, random)>
<cfset itemList = ListDeleteAt(itemList,
ListFind(itemList, random))>
<cfset itemCount = ListLen(itemList)>
</cfloop>
<cfloop from="1" to="#showNum#" index="i">
<cfoutput>
<table width="205" border="0" align="left"
cellpadding="0" cellspacing="0">
<tr>
<td width="235" height="116"> <div
align="center"><img
src="../Products/ProductPictures/#getitems.pic[ListGetAt(randomItems,
i)]#" width="100"></div></td>
</tr>
<tr>
<td
class="ProdTitle">#getitems.brand[ListGetAt(randomItems,
i)]# #getitems.modl[ListGetAt(randomItems, i)]#</td>
</tr>
<tr>
<td
class="paragraph">$#getitems.prc[ListGetAt(randomItems,
i)]#</td>
</tr>
<tr>
<td><A
href="../Products/details.cfm?prodid=#getItems.prodid[ListGetAt(randomItems,
i)]#" class="linkcontact">more
info</a></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</cfoutput>
</cfloop>
</cfif>To start a new row after 3 records, do something like this.
<table>
<tr>
<cfoutput query="something">
<td>#data#<td>
<cfif currentrow mod 3 is 0>
</tr><tr>
</cfoutput>
</tr>
</table>
You should also know that your approach is very inefficient
in that you are bringing in to cold fusion more data than you need.
First of all you are selecting every field from 3 tables when you
don't appear to be using all of them. Second, you are selecting
every record and you only want to use 3. There are better ways out
there, but they are db specific and you did not say what you are
using. -
Dynamic table with drop down lists
I have a Dynamic table with a header row, Section and footer row.
Section has the following cells(columns): Cell1 (drop down with locations), button (to remove row), CCode (Color Code RAL), CName (color name).
I'm starting with 1 row.
now what I want to do is, when they select in CCode e.g. RAL 1003 (rawValue "1") then in CName the name "signal yellow" (rawValue "1") should appear.
I'm using javascript
My first problem is how do I know which value is chosen, because this isn't working:
if (this.rawValue == 1)
xfa.host.messageBox('Today')
and second how do I set the value in CName
because this only sets it in the first CName cell:
xfa.form.DataSheet.TechnicalInformation.Markings.THatchPatterns.Section.CName.rawValue = '1';
Please help me, I'm totally lostsolved the problem, instead on change event put script on exit event.
and the following line does the trick:
xfa.resolveNode("THatchPatterns.Section[" + this.parent.index + "]").CCode.rawValue = this.rawValue -
Dynamic table with header on each page
Hi,
I am new to livecycle forms. I am not sure if I am asking a silly question but this is what I need to achieve.
I am designing a pdf form using livecycle designer. Need to build a dynamic table using data from xml. The challenge is I need to have a signature button on each page and the button will be below the table. So if there are for eg. 100 rows of data, then the table should be split into 5 pages of 20 rows each page (each page should have the table header) or based on page content and the button should be on the bottom of each page. Is it possible to achieve this? Also any example/suggestion on implementing signature using signature pad would be greatly appreciated.Hi,
For individual objects, like the button that you want to appear on each page, you should place this on the Master Page. Position the button at the bottom of the page and then make sure that you size the Content Area, so that the button is OUTSIDE of the content area. This way objects on the design page will not overflow over the button. See here: http://assure.ly/g0Wx7r.
If you are using a Table object for your data, then you can set it to repeat the Header row, see the Object palette.
If you are using ADEP Designer 10 (latest version of Designer) AND your users will have Acrobat X/Reader X (eg version 10.1), then you could use Flash object for a signature field. See the example here: http://assure.ly/rqCuEn. See "Assure Dynamics Map with Signature" example. Again please note that you will need Acrobat X/Reader X to view this.
Hope that helps,
Niall -
Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.
Ivor,
Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
and the form samples.
Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
Steve -
Dynamic Table with repeating Subform
Hello,
I am maiking a form which has a Dynamic Table with a repeating Subform. The repeating subform has a dropdown list field which has three options for the user to pic. "LABOR", "EQUIPT.", & "MATL."
The way I want the form to work is the user will choose which item they want to add to the form with the dropdown list. Whatever amount they put into the "Amount" column will go to the corresponding total "LABORTotal", "EQUIPTTotal", & "MATLTotal"
The repeating Subform is basically the Row1, but I have the table split up into subforms because of issues I had eariler with the form. The repeating subform title is "detail".
I cannot get the sums for the 3 items to go into the corresponding totals field. This is the script that I have for the labor total field:
form1.total.LABORTotal::calculate - (JavaScript, client)
var nAmount = xfa.resolveNodes("detail[*].Table1.Row1.AMOUNT");
var nItem = xfa.resolveNodes("detail[*].Table1.Row1.ITEM");
var nSum = 0;
for (var i=0; i<nAmount.length; i++)
if (nItem.item[i].rawValue == "LABOR")
nSum = nSum + nAmount.item(i).rawValue;
This.rawValue = nSum;
I am not familiar with loop scripting or var scripting so I know I am getting it wrong somewhere.
I would greatly appreciate any help!
ThanksOkay,
Here is your form back to you: https://acrobat.com/#d=IA67zcTBrWlnpcYS234*XQ.
The issue wasn't the script. If you select the dropdown and go to the Object > Binding palette, you will see you had ticked "Specify values" and these were set to 1, 2 and 3.
This meant that if the user selected LABOR, the value of the dropdown was "1" and NOT "LABOR". This was throwing the if statement.
I deselected the specify values and it worked as expected.
Hope that helps,
Niall -
Dynamic table with radio buttons
I need to load a dynamic table with radio buttons that allow
the user to select an item in the table. I need to have it add a
radio button with a unique identifier for each table item.
For example: the table will load all of the seminars
locations available in a certain state, the radio button will allow
the user to select the city in which they would like to attend and
that value will get passed to the registration page. The value of
each radio button would be equal to the location_id in the database
for each of the locations in the table (The table includes the
date, day, venue, address, hotel info, etc. details for each city.)
When I add dynamic radio buttons and set the value to the
location_id in the database, it allows the user to select multiple
radio buttons. I cannot find any information on how to
resolve.....??
Any help is appreciated.beanieboo wrote:
> I need to load a dynamic table with radio buttons that
allow the user to select
> an item in the table. I need to have it add a radio
button with a unique
> identifier for each table item.
>
> For example: the table will load all of the seminars
locations available in a
> certain state, the radio button will allow the user to
select the city in which
> they would like to attend and that value will get passed
to the registration
> page. The value of each radio button would be equal to
the location_id in the
> database for each of the locations in the table (The
table includes the date,
> day, venue, address, hotel info, etc. details for each
city.)
>
> When I add dynamic radio buttons and set the value to
the location_id in the
> database, it allows the user to select multiple radio
buttons. I cannot find
> any information on how to resolve.....??
> Any help is appreciated.
Give each radio button the same name
<input type="radio" name=theLocation" value="<?php
$recordset['location_id'] ?>">
Mick -
Dynamic table with header locked and vertical scrollbar problem.
Hi,
I have created a dynamic table with header locked.The sample code is as below.
<div style="width:910px ; overflow-x : scroll">
<h:panelgrid ...for header populated by binding to pagecode/>
<div style="width:910px ; height:200px ; overflow-y : scroll">
<h:panelgrid ...for data populated by binding to pagecode/>
</div>
</div>
The above piece of code serves the purpose.
There is an overflow in both x as well as y directions and scrollbars appear.But the y scrollbar can be seen only when the x-scrollbar is moved to the extreme right.
Does anyone have a solution so that both the scrollbars can be seen as soon as the table loads without the need to move x to the extreme right to see y?wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
CALL METHOD gr_alvgrid1->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = it_fieldcatalog1[]
it_outtab = <l_table>.
i am using like but its not accepting more than one line header in is_layout, is there any possibility to take like this.
Regards,
Mallikarjuna. -
Filling dynamic table with dynamic structure en fields!
Hello All,
I have written the following code. Which is okay according the syntax check. But when I run the abap code it will give a syntax error. I want to insert data from database table into internal table. Because the tables that have to read are so many I decided to make a dynamic statement which can be used for all tables. Except it won't work as I wish.
(LT_FIELDS) content is the dynamic fields which are defined earlier in the code and will change each loop.
(TAB_X) content is the dynamic internal table which is defined earlier in the code and will change each loop.
= structure of PA0002.
(TAB_N) = T_PA0002.
The code:
SELECT (LT_FIELDS) FROM (TAB_X) INTO CORRESPONDING FIELDS OF .
ENDSELECT.
Can someone give me some advice how to solve this issue?
During the run at the line "INSERT (TAB_N) FROM . " SAP creates an error like below.
K. tekst
Ein in einem SQL-Befehl genannter Tabellenname ist unbekannt.
Wat is er gebeurd?
Error in ABAP application program.
The current ABAP program "ZPF_R_MUTATIEOVERZICHT_MAIA" had to be terminated
because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Foutenanalyse
Es ist eine Ausnahme aufgetreten, die weiter unten näher erläutert wird.
Die Ausnahme, der die Klasse 'CX_SY_DYNAMIC_OSQL_SEMANTICS' zugeordnet ist,
wurde nicht abgefangen und führte deshalb zu einem Laufzeitfehler.
Der Grund für die Ausnahme ist:
In einem SELECT-, UPDATE- oder DELETE-Befehl wurde ein ungültiger
Tabellenname "T_PA0002" angegeben.
Aus einem der folgenden Gründe tritt der Fehler erst zur Laufzeit auf:
- der Tabellenname wurde dynamisch angegeben, oder
- die SELECT-Klausel, WHERE-Klausel, GROUP-BY-Klausel, HAVING-Klausel
oder ORDER-BY-Klausel wurde dynamisch angegeben.I Just want to insert data into internal table T_PA0002 from database table PA0002.
The internal table and database table can change during the runtime of the program. But Its always filling the internal table with data from database table.
I made it this way because the data I need to extract from data base tables can change depending on the procedures in table T9VS2.
So I can't know the structure or the table which has to be selected each procedure. Or I have to make a big program with a lot of if or Case statements in it. I want to avoid that! Dynamic table is much quicker to write and understand when it works.
It wil reduce a lot of code! I hope someone can give me a hint to solve the problem. -
Dynamic Tables and Data Service
hi :)
i have a dynamic table (with add/delete row) buttons,
one of the fields in each row, needs to populate the rest of the fields with first/last/address information.
i understand how the data service works for a single fields, is there a way to do this by adding/deleting rows?
how can i bind them? and how do i ensure that the proper row is populating?
Thanks!To get the instance of the subform that you are working on you can use this.parent.index. Now when addressing the field the occurance number is on the container subform and not on the field itself. So if you had a Page1 - Subform1 - Row - Object you would use Page1.Subform1.Row[instancenumber].object.rawValue
The only issue is the the [] are illegal in javascript so you can use the syntax:
xfa.resolveNode("Page1.Subform1.Row[" + this.parent.index + "]").object.rawValue
Make sense?
Maybe you are looking for
-
I have sound problem in My Cq40-144TU Laptop
Hi, I have Cq40-144tu laptop. i am't hearing sound from internal speaker but sound is hearing from headphone. I have configured my system many time. Last got to shop and they also format it and reconfigured but still this problem is showing. But I w
-
I downloaded a rented movie in hd to my ipad2 but can't find it to pay through my apple tv now. How do I watch the movie?
-
Error while opening an attached FI Document in transaction FB03.
Hi Gurus, I have to open the attached documents in trasaction FB03 but I am recieving the following Error. ERROR: Error calling application via OLE ALVIEWER.APP. Thanks and Regards, Amit.
-
Removing color from a PDF file
I am trying to remove the colors from a PDF file. To do this I print it to "Adobe pdf" setting the parameter in the Paper/Quality tab, Black & White. But in the generated PDF the color is still there ! How can I remove the color from a PDF file ? Tks
-
Idoc "CRMXIF_ORDER_SAVE_M02- doc_flow" data not pumped in
hi experts.. i am using idoc in my lsmw... my basic type is CRMXIF_ORDER_SAVE_M02... all the data can be pumped in except the E101CRMXIF_DOC_FLOW_XT node... i only want the "Campaign" field in tcode CRMD_ORDER "service contract->header overview tab"