on 2020 Apr 21 11:05 PM
Hello All,
I am seeking help to create a group based on numeric values. I have data values like 101, 101 BD, 102, 102BD and so on. I want to create a group based on numbers. The groups would be like 101, 102, 103 and so on. Please advise. I would appreciate your help. Thanks
Request clarification before answering.
Hi Gurpreet,
You'd need to traverse the string and extract the numbers. Create a formula with this code and use it as the group:
local numbervar i;
local stringvar ID := {table.stringField};
local stringvar ID2;
If isnumeric(ID) Then
tonumber(ID)
Else
(
for i := 1 to len(ID) do
(
if ID[i] IN ['0' to '9'] then
ID2 := ID2 & ID[i];
);
tonumber(ID2);
)
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Abhilash, the provided solution works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
18 | |
10 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.