PROMPT for DATASOURCE workaround

Discussions and Tech Support related to the iMacros Google Chrome extension.

Moderators: Marcia, iOpus, Hannes, iOpus, Tech Support, Tom, iOpus

PROMPT for DATASOURCE workaround

Postby opal29 on Mon Jul 12, 2010 8:46 pm

What I'm trying to achieve: Use PROMPT to determine how to to fill out a web form.

For example: If you enter 1, then the form is filled out:
color = x
height = y
length = z

However, If enter 2, then the form is filled out:
color = a
height = b
length = c

Here is what I have written:

Code: Select all
VERSION BUILD=1110311 RECORDER=CR
PROMPT set: !VAR1
SET !DATASOURCE H:\datasources\{{!VAR}}.csv
SET !DATASOURCE_COLUMNS 3
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:color CONTENT={{!COL1}}
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:height CONTENT={{!COL2}}
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:length CONTENT={{!COL3}}


However, I have learned that PROMPT and DATASOURCE don't work together.

Any suggestions for workarounds?
opal29
 
Posts: 2
Joined: Mon Jul 12, 2010 8:36 pm

Re: PROMPT for DATASOURCE workaround

Postby Tom, iOpus on Wed Jul 14, 2010 5:36 am

Hi opal,

You have a mistake on the SET !DATASOURCE line: You're referencing !VAR instead of !VAR1. Change it to:

Code: Select all
SET !DATASOURCE H:\datasources\{{!VAR1}}.csv
Regards,

Tom, iOpus Support
Tom, iOpus
 
Posts: 445
Joined: Mon May 31, 2010 9:59 am

Re: PROMPT for DATASOURCE workaround

Postby opal29 on Wed Jul 14, 2010 9:58 am

[quote="Tom, iOpus"]Hi opal,

You have a mistake on the SET !DATASOURCE line: You're referencing !VAR instead of !VAR1. Change it to:

I had actually caught that typo and unfortunately it does not fix it. From the wiki, it seems like you can't use a variable in the DATASOURCE line.
opal29
 
Posts: 2
Joined: Mon Jul 12, 2010 8:36 pm

Re: PROMPT for DATASOURCE workaround

Postby Tom, iOpus on Wed Jul 14, 2010 10:09 am

Hmmmm... well I tried this in iMacros for Firefox and the iMacros Browser and it works. It may be that this is not yet supported in iMacros for Chrome. Let me see what I can find out from the Chrome development team.
Regards,

Tom, iOpus Support
Tom, iOpus
 
Posts: 445
Joined: Mon May 31, 2010 9:59 am


Return to iMacros for Chrome

Who is online

Users browsing this forum: No registered users and 1 guest