Add rows to dataset
I need to add a row of data to an existing dataset from an
XML file. The row must part of the dataset so that master detail
relationships will can use the extra data. Modifying the XML is not
an option (too much work- many different XML files all updated
frequently).
Is there a function available to add some rows to a
dataset?
V1- yes that is what I am looking for but my programming
skills are not up to par yet.
I have added this code to my page:
var dsColors = new
Spry.Data.XMLDataSet("../feeds/tshirt.xml",
"CATEGORY/SIZE/COLORS");
function addToDS(newItem){
// Create row id
var recordID = "ROWID-" + ds1.data.length;
// Add new record to the dataset
ds1.data.push({ myItem: newItem, ds_RowID: recordID });
ds1.loadData();
Here is my XML:
<COLORS color="WHITE" key="@c_white@">
<BRAND code="BUN">B-Unique</BRAND>
<BRAND code="DUB">Dub Ceasar</BRAND>
</COLORS>
So to add an additional row, I *think* i need something like
this:
var newRow = { BRAND = "XXX-WWW", @BRAND/code = "XWX", COLOR =
"SHOW ALL COLORS", @key = "ZZZ" };
Where I am lost is how to put it together with a command to
execute the function. What I want is for the new row(s) to be added
to the dataset as the page is loading.
Similar Messages
-
How to manually add rows to DataSet ?
Hi,
Apologies if I have missed something obvious - but how should
I manually add rows to an empty dataset ?
I've seen the setDataFromArray example in the
samples
- but I just want to take a value from a form field and add it to
the dataset.
Thanks,
RichardI've just answered it myself...
use this in the head :
var ds1 = new Spry.Data.DataSet();
ds1.data=[];
function addToDS(newItem){
// Create row id
var recordID = "ROWID-" + ds1.data.length;
// Add new record to the dataset
ds1.data.push({ myItem: newItem, ds_RowID: recordID });
ds1.loadData();
Just call addToDS(value of an input field) using an onclick
event. -
Flex Table Add Row Issue with Dynamic Entry Lists in Visual Composer
All,
Your help would be kindly appreciated in resolving an 'Add Row'-issue within a Flex Table that uses Dynamic Entry Lists in Visual Composer. The issue here is as follows :
When I use a [Local Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=O5hrG2aMxWZ84Mu1211193041]to populate a row field, the initial row and all next rows are emptied upon 'insert row', they loose their selected values and also the entry list values ('pull-down menus') are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
The initial row does [show the entry list values |http://www.postyourimage.com/view_image.php?img_id=2HybmEHAuQYs9cg1211192766]from the Local Dynamic Entry List based on the dynamically assigned input value; upon 'insert row' the entry lists are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
When using a [Global Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=m5p2KYuBb442dTq1211193501]to populate the row fields the Flex-table behaves normally as expected. Unfortunately with a Global Entry List it is not possible to dynamically assign a input value. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=U96V0zENCCyO3gA1211193157].
Please also see the [issue summary image|http://www.postyourimage.com/view_image.php?img_id=06xti08tIEfely1211195178] I made to visualize the issue. What I basically would like to know is whether this is a 'known issue' or not, or that it is an issue that can be fixed or whether there is an alternative workaround available ... I'm using Visual Composer 7.0 and the Portal is at SP 13.
Many thanks,
FreekHi,
you should be able to assign a dynamic value with global entry lists as well. If you say @myParam as dynamic value. VC will indicate in red letters, that the field @myParam is unknown. However, it will work, as long as @myParam is known in the form or table where you use the entry list.
I have never heard of the problem that entry lists are emptied after "insert"-event.
Kindes Regards,
Benni -
How can i add rows in a tabular form
Hi,
How can i add rows in a tabular form with out updating in database and after adding the rows one by one and after filling the data then iwant to submit them all at once.Please help me on this.
ThanksHello Leandro,
In the Add_Rows page process, there is a box for "Number Of Rows". Change that value and you change the number of rows that get added. The default is 1.
Don.
You can reward this reply by marking it as either Helpful or Correct :) -
Missing functionality.Draw document wizard - delete/add rows and copy/paste
Scenario:
My customer is using 2007 SP0 PL47 and would like the ability to change the sequence of the rows of the draw document wizard and delete/add multiple rows (i.e. when you create an AR Invoice copied from several deliveries).
This customer requires the sequence of items on the AR invoice to be consistent with the sequence on the original sales order including text lines and subtotals. Currently we cannot achieve this when there are multiple deliveries.
Steps to reproduce scenario:
1.Create a Sales order with several items and use text lines, regular and subtotals.
2.Create more than one delivery based on the sales order and deliver in a different sequence than appears on the sales order.
3.Open an AR Invoice and u2018Copy fromu2019 > Deliveries. Choose multiple deliveries. Choose u2018Customizeu2019.
4.Look at the sequence of items on the Invoice. How can the items and subtotals and headings be moved around so they appear in the same sequence as on the sales order?
Current Behaviour:
In SAP B1 itu2019s not possible to delete or add more than one row at a time on the AR Invoice or Draw Document Wizard.
Itu2019s not possible to copy/paste a row on the AR Invoice or Draw Document Wizard.
Itu2019s not possible to change the sequence of the rows using the Draw Document Wizard.
Business Impact: This customer is currently spending a lot of time trying to organize the AR invoice into a presentable format. They have to go through the invoice and delete the inapplicable rows one by one (because SAP B1 does not have the ability to delete multiple lines at a time) and also has to manually delete re-add rows to make it follow the same sequence as the sales order.
Proposals:
Enable users to delete or add more than one row at a time on the AR Invoice or Draw Document Wizard.
Enable users to copy/paste rows on the AR Invoice or Draw Document Wizard.Hi Rahul,
You said 'It is not at all concerned with Exchange rate during GRPO...' If that is the case how does the Use Row Exchange Rate from Base Document in the draw document wizard work? Does this mean 1 GRPO : 1 AP Invoice so I can use the base document rate?
How should I go about with transactions like these? That is adding an AP Invoice from multiple GRPO's having different exchange rates. What I am trying to capture here is that in the AP Invoice, base document rates should be used in the row item level and not the current rate when adding the invoice.
Thanks,
Michelle -
How do I create an "Add Row" button (add instance with click activity)
I've been looking through a couple of examples, but the xml is lost on me. I need to learn how to do this for myself because it'd help me out on so many forms. There're forms I just simply cannot do without this function.
Where I get lost is the javascript linking the button to the specific table. I've been trying to use this I found in an example:
<event activity="click"><
script contentType="application/x-javascript">SAPS350a.Page1.TableData1.Table1.Row2.instanceManager.addInstance(1);</script></
event>
Now, I'm a complete newbie, so I'm sure someone can point out to me exactly what's wrong, but I dont know what "SAPS350a" means nor can I figure out where the label "TableData1" connects to.
If anyone can explain this in a "add rows for dummies" fashion, I'd be greatly appreciative.
See attached an example of one of the fields I need to repeat.Hi Liz. You shouldn't really be playing in the xml. Especially if you are a newbie . You could corrupt the whole form if you do something wrong and you probably wont be able to rectify it. Scripts must be added in the script window. In your post, the 'SAPS350a.Page1...' is the path to the row of the particular form that you copied that code from. I have added a button to your form. have a look at the script to see what i have done.
-
Error:Cannot add row without complete selection of batch/serial numbers
Dim oPDN As SAPbobsCOM.Documents
oPDN = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
Dim serno As String = "SH-A1,SH-A2"
Dim sernoval As String() = serno.Split(",")
Dim mnfser As String = "SH-B1,SH-B2"
Dim mnfserval As String() = mnfser.Split(",")
For k = 0 To sernoval.Length - 1
oPDN.Lines.SerialNumbers.InternalSerialNumber = sernoval(k).Trim
oPDN.Lines.SerialNumbers.ManufacturerSerialNumber = mnfserval(k).Trim
oPDN.Lines.SerialNumbers.Quantity = linedetails(iRowNo).Quantity
oPDN.Lines.SerialNumbers.SetCurrentLine(k)
oPDN.Lines.SerialNumbers.Add()
Next
oPDN.CardCode = "C232323"
oPDN.Lines.ItemCode = "A00004"
'oGR.Lines.LineNum = 0
oPDN.Lines.BaseLine = 1
oPDN.Lines.BaseEntry = 202
'oGR.Lines.BaseRef = 203
oPDN.Lines.BaseType = 20
oPDN.Lines.Quantity = 1
oPDN.Lines.UnitPrice = 2
oPDN.Lines.WarehouseCode = '01'
oPDN.Lines.Add()
lRetCode = oPDN.AddHi Vasanth,
Invert the SetCurrentLine () and Add() at the end of the SSSerialNUmbers loop.
Regards,
Eric -
How to use add row button of a tabuler form.
Hi all,
I have created a Tabuler form in my application.Could you please tell me 'How can i use the add row button of this form' as When i click the button "NOTHING HAPPENS".
Thanks
Regards,
NehaHi,
If you edit the button, the button name has to be 'ADD'. You can make the text / label whatever you like. On the form edit page, the button should appear with this text next to it: submit as "ADD".
HTH -
Weird Problem with Add Row Button in Master Detail Page
I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen?I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen? -
Hi Gurus,
I have requirement to add rows in report FBL1N in order to display all item per document ( like in document overview ) in the same screen.
I applied note 112312 to display offset a/c (BTE with FM LINE_ITEMS_GET_GKONT) but partialy resolve my pb that is one item is displayed.
I would like to know how to do this, if i have to use BADIs (such BADI FI_ITEMS_MENUE01 ) and witch one or clone de STD or customazing.
Thanks in advance.Ok,
trx FB1N, after selection give me :
DocumentNo Type Doc..Date Offst.acct
5300029134 TL 22.05.2007 600819 => one account per document
5300034345 TL 07.06.2007 600819
5300038636 TL 21.06.2007 600819
5300038637 TL 21.06.2007 600819
4200014129 FA 28.02.2007 40811030
4200012196 FA 31.03.2007 40811030
4200013351 FA 31.03.2007 60640000
details of fisrt document (n° 5300029134) give 4 line items :
Itm PK Account Account short text Amount
1 25 600819 LYRECO 20,524.36
2 39 600819 LYRECO 20,524.36-
3 50 51110040 BN att FGX LCR n.D. 20,524.36-
4 40 51119800 En cours E à P 20,524.36
my requirement is to display 3 account ( 600819, 51110040 and 51119800) given in details of document in column Offst.acct when excute FBL1N in stead of one. like this :
DocumentNo Type Doc..Date Offst.acct
5300029134 TL 22.05.2007 600819
5300029134 TL 22.05.2007 51110040
5300029134 TL 22.05.2007 51119800
5300034345 TL 07.06.2007 600819
5300038636 TL 21.06.2007 600819
5300038637 TL 21.06.2007 600819
4200014129 FA 28.02.2007 40811030
4200012196 FA 31.03.2007 40811030
4200013351 FA 31.03.2007 60640000
I hope that is more clear,thanks fo your patience. -
'Another user or another operation modified data, to continue open the window again ' Inventory Transaction Log' (OITL)(ODBC-2039) (Message 131-183). If I click again on add I get the following message : 'Cannot add row without complete selection of Batch / Serial Nos. [Message-29-77]
Path:
Inventory -> Item Management -> Batches -> Batch Management - Complete form.
Before this I use Return Components on Receipts from Production as I am mistakenly issued it more than what was needed.
Were anyone be able to explain why it worked for certain items and not for others? I have successfully done “return components with some batches"Hi Nagarajan,
I'm one of colleague of caterine, we only accessing the batch management-complete window, no other window is open, still the error occurs; see image below
Before that error occurs(in image); first error we encounter was batch number is already exist, then upon click add another person modified the window; but we tried to restore the db then try to add the batch number in different transaction like SI 1658(Goods Issue), and it is okay.. but on the SI 50003 which is Receipt from production we can't add it.
Hope you can help us.
Regards,
Lean -
Add row / delete row in PDF Form
Alright so I am really struggling here and no one has been able to provide me a solid answer to date.
1. I am creating a PDF form I want users to be able to fill and remit via email
2. I have created the form in Acrobat 9 Pro via the form Wizard and in some combination with MS Word 2007 for text and table fields to get the forms wizard to auto-populate Adobe form fields.
3. Some of the tables, i.e. In the first table for "Full Time" and "Part Time" should have check boxes - works fine to date. While others should have drop downs, i.e. platform build, etc - works fine to date.
4. This is the pressing issue. As they exist today there is a large table as you can clearly see. I want users to be able to simply click an "Add Row" or "Delete Row" button to add another row to the table (or delete) without having to have a massive table.
I've watched demos on Lynda.com (all of which are irrelevant and provided 0 value), tried to work with what people have responded with previously but all are mainly sample documents and I don't know where to start. In short, I open my form and other forms in LifeCycle Designer ES, take a look at the buttons people have created, the scripts, the XML source, etc. but no idea where to go. If the button needs to be in the table. How it should be scripted. etc. I cannot find a video tutorial anywhere on the web and all the responses simply provide a sample but no idea how to make it a reality in terms of translating their sample into a working dynamic form in PDF. Any help is greatly appreciated. Thanks.For a dynamic table you have to design a new XFA-form in Designer.
Here's a little tutorial how to create dynamic tables.
http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/
Just a little correction.
You can inport Docx-Files with tables and add / remove rows in a dynamic PDF.
But, this is not handy, if the table contains more than one row when it is imported because Designer gives every detected row the same name (Row).
Delete all row excepting the first one and set it to repeatable in the binding tab.
Then you can use the addInstance() and removeInstance() methods to add/remove row to the table.
Here an example file I made from a docx file.
https://acrobat.com/#d=k8XbQWmqu6bhfrrwui93pw -
Add row button is not working in manual tabular form
Hi,
I have created a tabular form by using collections. In the same page there is a wizard tabular form also.
Here my problem is whenever i giving request to the add row button its showing nothing. there is no any new row got added.
IF :REQUEST ='ADD'
THEN
apex_collection.add_member(
p_collection_name => l_collection_name
END IF;
END;
Thanks.Hi,
Thanks for ur reply.
My problem got solved after deleting the tabular form wizard from the page then add row button is working.
But i think its not the solution.
Thanks. -
I've read the threads and done numerous searches. Not sure why the add row button isn't working, other buttons work.
Here's what I've found and done.
Print button subform - positioned (have tried flowed, too) allow page breaks
Table: body rows vary - Insert wrap in subform - subform flowed - allow page breaks
row 1 binding - repeat row for each data item - min 1, max 25 (why won't it keep an initial count when I try putting in 1 or 0?)
Form properties - preview in dynamic PDF, interactive - PDF render format dynamic xml, run in 9.0 or later (to remove errors)
Insert Row Button in Subform Row 1 Cell 1 (not counting header row) on click, JavaScript run at client tried table.row1.instancemanager.addinstance(1); also tried full path
saved as dynamic pdf
My hierarchy looks like:
form1 [autofit]
master pages
page 1
untitled content area
printbuttonSubForm [flowed, top to bottom, allow page breaks]
untitled subform [flowed, top to bottom, allow page breaks]
printbutton1
tablesf [flowed, top to bottom, allow page breaks]
table1 [allow page breaks]
headerRow
cell1
cell2 etc
Row1 [allow page breaks, repeat row for each data item, min 1, max 25 (why won't it keep an initial count when I try putting in 1 or 0?)]
subform [allow page breaks, repeat row for each data item, min 1, max 25
(why won't it keep an initial count when I try putting in 1 or 0?)]
button1 table1.row1.subform1.instanceManager.addinstance(1);
cell2, etc
Referenced objects
Questions:
I click the Add Row button, but nothing happens, why? The print button works.
Found a reference to def instances of same row, what does that mean?
Is my hierarchy correct?
How to set Form1 to flow? Object says mixed objects with no options
Many thanks for your assistance! LeslieHi Leslie,
There could be a few things.
First check that the form is saved as Dynamic XML in the save as dialog. If it is saved as Static the add instance will not work.
Make sure that the object you are targetting is set to repeat in the Object > Binding tab
Check your syntax in the script editor (button above the editor). Some of your post is not camel case. For example addInstance and instanceManager. Note the capital letter for the second word.
If you could share your form it would be easier to track down what the problem is. You can use Acrobat.com or YouSendIt.com or some other file sharing site. Just remember to post the published URL.
Good luck,
Niall -
Field values erases when Add Row button is pressed in Master Detail Form
Hi,
I am using APEX 4.0. There is a master-detail form in a page, this has 5 rows in it by default, has a Add row and a Delete button. I face two problems now:
1. When the values are entered in all the 5 rows, that are in default, and Add Row button is clicked, these values are entered in the DB, but they are erased from the interface. Means when user clicks Add row he don't see the old values he has entered. All new empty rows are only seen. This might confuse the user. How can I resolve this.
2. The values are saved to the DB only when the Add row button is clicked, so suppose if the user enters some wrong values in the default rows and after he clicks Delete button, all the field values are erased. Is there a way to delete only that particular row? (Please note: the values are not saved to the DB, unless the Add Row button is clicked)
Please let me know how to resolve these 2 issues.
Thanks.So let me get this straight:
You enter information into a tabular form and then click the add row and the data is being duplicated from the prior row or being inserted into the table ?
Thank you,
Tony Miller
Webster, TX
A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
"I didn't know there were any witnesses", I replied " Now I'll have to kill you too"
Maybe you are looking for
-
Mid 2006 iMac Boot Problem (Since latest firmware update)
I have a Mid 2006 17" iMac. Ever since the latest firmware update in early December, about every other startup I've been having boot problems. After the white screen with the Apple Logo and the spinning wheel it goes to a blue screen like normal, but
-
Contact with AP but no internet?
Subject say's it all. I have made contact with the AP but not the internet? any ideas?
-
An error occured during apple event processing (-43)
When I drag a photo from Iphoto to the desktop, all I get is an empty file. When I click on it I get the error message. I have never had this problem and have imported from this camera many times. By putting a photo on the desk top I have more contro
-
How to install a PostScript printer
Hi, I need to install a postcript printer but I cant find any drivers in mac os lion. Can you tell me how to do so? Thnax a lotin advance
-
layout:treeview Closed tree structure?
HI, I'm able to generate the tree view structure but the problem is, when close & open the window , it is showing open tree structure i want it to be close tree view <layout:treeview expandedLevelsAtFirst="-1" > <logic:present name="agrovoc" >