Insert data in the last row (dinamically)

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Insert data in the last row (dinamically)

by fiore_ARG on Fri Dec 28, 2012 11:13 am

iMacros verion: iMacros for Firefox VERSION BUILD=7601105
OS: Windows 7
Browser: Firefox 17.0.1

Hi everybody!

I´m trying to create a macro to add several rows in a javascript/html table.
Basically, there is an "Add row" button in the form, which adds an empty row at the end of the table, and i need to fill it and save the form.

Here´s the problem...

When i´m recording the macro, it saves the "new added row" position (in this case POS=29). Then, when i play the macro... it re-updates the row in POS=29 in place of edit the last added row.

TAG POS=1 TYPE=IMG ATTR=SRC:http://***/addrowbutton.gif
TAG POS=29 TYPE=SELECT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=ID:ServiceActivityCodeCombo CONTENT=%7
TAG POS=29 TYPE=INPUT:TEXT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=NAME:DebriefQuantity CONTENT=0.01
TAG POS=29 TYPE=SELECT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=ID:DebriefUOMCombo CONTENT=%MIN
TAG POS=29 TYPE=INPUT:TEXT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=NAME:DebriefDate CONTENT=28-DEC-2012
TAG POS=1 TYPE=DIV ATTR=TITLE:Save<SP>changes&&CLASS:button<SP>save<SP>saveDebrief
TAG POS=1 TYPE=BUTTON ATTR=TXT:OK

I think that what i need to do is to use a "wildcard" for dynamically update the "last row" position or maybe use a variable with the actual last row position, and increment it by 1 on each loop, but not so sure in this one....

Any comment will be very helpful!
Thanks.
fiore_ARG
 
Posts: 1
Joined: Fri Dec 28, 2012 10:51 am

Re: Insert data in the last row (dinamically)

by sandip1411 on Mon May 29, 2017 4:53 am

I am also facing the same problem. If you are able to find a solution to this problem, please update
sandip1411
 
Posts: 5
Joined: Fri May 26, 2017 12:12 am

Re: Insert data in the last row (dinamically)

by chivracq on Mon May 29, 2017 10:08 am

fiore_ARG wrote:
Code: Select all
iMacros verion: iMacros for Firefox VERSION BUILD=7601105
OS: Windows 7
Browser: Firefox 17.0.1


Hi everybody!

I´m trying to create a macro to add several rows in a javascript/html table.
Basically, there is an "Add row" button in the form, which adds an empty row at the end of the table, and i need to fill it and save the form.

Here´s the problem...

When i´m recording the macro, it saves the "new added row" position (in this case POS=29). Then, when i play the macro... it re-updates the row in POS=29 in place of edit the last added row.

Code: Select all
TAG POS=1 TYPE=IMG ATTR=SRC:http://***/addrowbutton.gif
TAG POS=29 TYPE=SELECT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=ID:ServiceActivityCodeCombo CONTENT=%7
TAG POS=29 TYPE=INPUT:TEXT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=NAME:DebriefQuantity CONTENT=0.01
TAG POS=29 TYPE=SELECT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=ID:DebriefUOMCombo CONTENT=%MIN
TAG POS=29 TYPE=INPUT:TEXT FORM=ACTION:http://***/page?_pageid=955,7800129&_dad=portal&_schema=PORTAL ATTR=NAME:DebriefDate CONTENT=28-DEC-2012
TAG POS=1 TYPE=DIV ATTR=TITLE:Save<SP>changes&&CLASS:button<SP>save<SP>saveDebrief
TAG POS=1 TYPE=BUTTON ATTR=TXT:OK


I think that what i need to do is to use a "wildcard" for dynamically update the "last row" position or maybe use a variable with the actual last row position, and increment it by 1 on each loop, but not so sure in this one....

Any comment will be very helpful!
Thanks.

sandip1411 wrote:I am also facing the same problem. If you are able to find a solution to this problem, please update

Yeah..., @sandip, searching the Forum for similar Threads is very good, but you probably have a better "Chance" to get a Solution (and I probably already gave you a Solution btw...) if you "updated" and followed up on your own Thread, ah-ah...! :roll:
+ CIM again for this current Thread...! :mrgreen:

Chances that some User who only posted once on the Forum 5 years ago will come back to share their Solution after 5 years are pretty tiny, if they even remember how they solved it, oops...! :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6307
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 3 guests

-->