Correlate the Boundary value in Load Runner 12.5 - performance-testing

I am using loadrunner 12.5. In the below value I need to correlate and get the value 1aqeid!None (the None will also be filled with numbers so its dynamic)
Example:
1. {id:'1aqeid!None!123456',paramName:'jsessionId'};
2. {id:'1aqeid!zxsjfn12536782ldfj!123456',paramName:'jsessionId'};
I need to get only the below value
1. 1aqeid!None
2. 1aqeid!zxsjfn12536782ldfj
web_reg_save_param("ID","LB=id:'","RB=!","ORD=1",LAST);
I am not able to find the solution.

"LB={id:'",
"RB=',paramName:'jsessionID'",
"ORD=ALL",
LAST
This will leave you with:
1aqeid!None!{some value you do not need}
You have a number of options at this point. You could use strtok() and split your string with a '!' as a separator, you could parse the string to find the location of the second instance of the '!' in the character array and then take a substring using strncpy() before that as your value, or..... The point here is that you can collect more than you need and then trim down based upon a known separator in the data.

Related

Spotfire - Extract text based on conditions

I have a column containing a string value as shown is the example below :
ZAE/GER-ERT/HEZ/PDC
The idea is to extract the first trigraph (ZAE in this extract) and a second one based a rule.
The rule is, if there is a '-' separating two trigraphs, we don't extract them, we just take the first trigraph after a '/' and without a '-' after it.
We then use a - to separate the two results, here is the aim for the example : ZAE-HEZ
I would like to get this value in a new calculated column.
I've tried to play with the indexes based on the Find() and ExtractRX() functions, but couldn't make it work.
Thanks in advance !
I am not sure this is the simplest way, but it works for your example (assuming the strings are always alphanumeric in chunks of 3).
You can do it via an intermediate column (for sanity, although you could put the [tmp] formula directly into the final column):
[tmp] as
RXReplace(RXReplace([your_column],'\\w{3}-\\w{3}','','g'),'/+','/','g')
This removes any double trigraph like GER-ERT and then removes any leftover double /
Then the final column splits [tmp] by / and concatenates the first and second item
Concatenate(Split([tmp],'/',1),'-',Split([tmp],'/',2))

Excel- Turn MARIA ANDERS to M.ANDERS as well as 99 other names, only if the first name is > 3 letters

I am trying to output a customer name using vlookup. The names are UPPERCASE but I need to limit them if the first name is longer than 3 characters, I need to just use the first letter of the first name. Here is the problem:
If the First name is longer than three characters you should just use the first character
of the first name and put a dot after that. For example if the customer name is “Steve
Johnson” the system should show “S. JOHNSON” or for “Ana Johnson” the system
should show “ANA JOHNSON”.
I should be able to do this without VB. Maybe an IF statement? Like if the first name is > 3 letters, take the first letter in the string?
Use Find to locate the space, and If test the position. Then either return the string as is, or manipulate the string to suit your needs. Wrap the whole thing in Upper to get upper case
=UPPER(IF(FIND(" ",A1)<=4,A1,LEFT(A1,1)&"."&MID(A1,FIND(" ",A1),999)))

retrieve part of the info in a cell in EXCEL

I vaguely remember that it is possible to parse the data in a cell and keep only part of the data after setting up certain conditions. But I can't remember what exact commands to use. Any help/suggestion?
For example, A1 contains the following info
0/1:47,45:92:99:1319,0,1320
Is there a way to pick up, say, 0/1 or 1319,0,1320 and remove the rest unchosen data?
I know I can do text-to-column and set the delimiter, followed by manually removing the "un-needed" data, but my EXCEL spreadsheet contains 100 columns X 500000 rows with each cell looking similar to the data above, so I am afraid EXCEL may crash before finishing the work. (have been trying with LEFT, LEN, RIGHT, MID, but none seems to work the way I had hoped)
Any suggestion will be greatly appreciated.
I think what you are looking for is combination of find and mid, but you'll have to work out exactly how you want to split your string:
A1 = 0/1:47,45:92:99:1319,0,1320 //your number
B1 = Find(“:“,A1) //location of first ":" symbol
C1 = LEN(A1) - B1 //character count to copy ( possibly requires +1 or -1 after B1.
=Left(A1,B1) //left of your symbol
=Mid(A1,B1+1,C1) //right size from your symbol (you can also replace C1 with better defined number to extract only 1 portion
//You can also nest the statements to save space, but usually at cost of processing quantity increase
This is the concept, you will probably need to do it in multiple cells to split a string as long as yours. For multiple splits you probably want to replicate this command to target the result of previous right/mid command.
That way, you will get cell result sequence like:
0/1:47,45:92:99:1319,0,1320; 47,45:92:99:1319,0,1320; 92:99:1319,0,1320; 99:1319,0,1320......
From each of those you can retrieve left side of the string up to ":" to get each portion of a string.
If you are working with a large table you probably want to look into VB scripting. To my knowledge there is no single excel command that can take 1 cell and split it into multiple ones.
Let me try to help you about this, I am not a professional so you may face some problems. First of all my solution contains 2 columns to be added to the source column as you can see below. However you can improve formulas with this principle.
Column B Formula:
=LEFT(A2,FIND(":",A2,1)-1)
Column C Formula:
=RIGHT(A2,LEN(A2)-FIND("|",SUBSTITUTE(A2,":","|",LEN(A2)-LEN(SUBSTITUTE(A2,":","")))))
Given you statement of having 100x columns I imagine in some instances you are needing to isolate characters in the middle of your string, thus Left and Right may not always work. However, where possible use them where you can.
Assuming your string is in cell F2: 0/1:47,45:92:99:1319,0,1320
=LEFT(F2,3)
This returns 0/1 which are the first 3 characters in the string counting from the left. Likewise, Right functions similarly:
=RIGHT(F2,4)
This returns 1320, returning the 4 characters starting from the right.
You can use a combination of Mid and Find to dynamically find characters or strings based off of defined characters. Here are a few examples of ways to dynamically isloate values in your string. Keep in mind the key to these examples is the nested Find formula, where the inner most Find is the first character to start at in the string.
1) Return 2 characters after the second : character
In cell F2 I need to isolate the "92":
=MID(F2,FIND(":",F2,FIND(":",F2)+1)+1,2)
The inner most Find locates the first : in the string (4 characters in). We add the +1 to move to the 5th character (moving beyond the first : so the second Find will not see it) and move to the next Find which starts looking for : again from that character. This second Find returns 10, as the second : is the 10th character in the string. The Mid formula takes over here. The formula is saying, Starting at the 10th character return the following 2 characters. Returning two characters is dictated by the 2 at the end of the formula (the last part of the Mid formula).
2) In this case I need to find the 2 characters after the 3rd : in the string. In this case "99":
=MID(F2,FIND(":",F2,FIND(":",F2,FIND(":",F2)+1)+1)+1,2)
You can see we have simply added one more nested Find to the formula in example 1.

How to modify numbers at the end of a cell using a formula

I have cells in excel containing data of the form v-1-2-1, v-1-2-10, v-1-2-100. I want to convert it to v-1-2-001, v-1-2-010,v-1-2-100. I have nearly 2000 entries
If all of the data follows the format shown then you could use FIND to return the position of '-'. There will be three instances of this character and you need to find the third one so use the position given by the first instance as the start position parameter of the second FIND and again for the third (essentially nesting FIND). Once you have the position of the third '-' you know where the final set of numbers are (from the returned third position+1 to the LEN of the string) and could use SUBSTITUTE or a combination of other excel string functions to configure the final portion as you need it.
I'm assuming that excel has your data formatted as text.
If you need further assistance I'm happy to knock up the formula in excel but I'm off to work now and won't be able to do so for around 9 hours.
Please try:
=LEFT(A1,6)&TEXT(MID(A1,7,10),"000")

Sharepoint calculated field get number only

I have a SharePoint list with a field, Field A, holding values such as "Text-11" or "DifferentText-150" and I want a new calculated field, Field B, that only shows the numeric part of Field A (i.e. "11", "150").
The number can be between 1 and 9999 so I can´t take always the last 2 digits.
Does anyone have an idea how to realize that with the calculated field function of SharePoint?
You will need to use several different functions to accomplish this. Your primary function will be MID which will allow you to grab a part of the original text but then you will also need to use SEARCH for your starting point and LEN to get the correct number of characters. Here are the steps for making your formula:
You will need the index of the first character in the number. This can be achieved by finding the first character after the dash ('-'). Remember that indexes in SharePoint calculated fields start at 1 and not 0.
SEARCH("-",[Title],1)
Next you need to get the length of the number part of your string. This can be achieved by getting the length of the whole string and subtracting the index of the dash ('-').
LEN([Title]) - SEARCH("-",[Title],1)
Finally you can get the number part of the string by using the MID function and passing in the index of the first character in the number (Part 1) and the length of the number part (Part 2).
MID([Title],SEARCH("-",[Title],1) + 1,LEN([Title]) - SEARCH("-",[Title],1))
Note: Title is just the name of the test column that I used.

Resources