Posts: 19
Threads: 7
Joined: Oct 2009
Reputation:
0
12-20-2009, 07:36 PM
Hi ppl,
I am using descriptive programming to click a record from my database. since there are no unique properties i tried to hard code the value
say my html id is xyz_0_1 where 0 & 1 indicates row and column respectively.. i need to store "xyz_" in a variable and dynamically change "0_1" .how do i do it
i stored xyz in a variable a
and then 0_1 in another variable b. i concatenated both by mentioning as a & b
but the msgbox displays the a&b and not the values stored in it.Where have i gone wrong.pls correct me
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
12-21-2009, 12:06 AM
Please write your code here.
Posts: 19
Threads: 7
Joined: Oct 2009
Reputation:
0
12-21-2009, 01:19 PM
a="xyz"
b=_1
c= a & b
msgbox c
msgbox displays a&b instead of the values. i know that i have gone wrong in the third step while concatenating.pls correct me
sorry abt the duplicate thread
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
12-21-2009, 01:34 PM
not sure how are you getting such result, checkout your code properly.
you should use, either use b = 1 or b = "_1", instead b = _1
Posts: 47
Threads: 9
Joined: Feb 2010
Reputation:
0
09-13-2010, 04:32 PM
Hi all,
I have an approximately same issue, the idea is that I am getting a value from DB which is assigned to a variable, e.g. Requested_Field.
the format of this value is e.g.: 126991.55 (it have an ".")
then to the second variable is assigned another value, which is got from the application, it's value is for e.g. the same but format is another: 126,991.55 (with "," and ".").
when I am comparing them, I'm getting an error, this is because the formats are different: the report added by me when comparison fails is:
The variable1: '126991.55' is not the same as variable2: '126,991.55'! Please check manually!
Can anyone help me to remove the "," from first variable, I don't know which statement should be used to remove some specific chars(the chars I want) from a string or a variable..
Please can anyone help me?
Posts: 47
Threads: 9
Joined: Feb 2010
Reputation:
0
09-14-2010, 08:31 PM
Thanks a lot man, I found it and it's working.