Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have following field
Names
ali
hammad
ahmed
in text box i used =Index(NAME,'ALI') this show zero
i want to display the index number of the ali,hammad,ahmed
this is beacuse ali is first word
Index(NAME,'ali')
for more see this
Position of a substring. This function gives the starting position of the n:th occurrence of substring s2 in string s1. If n is omitted, the first occurrence is assumed. If n is negative, the search is made starting from the end of string s1. The result is an integer. The positions in the string are numbered from 1 and up.
Examples:
index( 'abcdefg', 'a' ) returns 0
index( 'abcdefg', 'cd' ) returns 3
index( 'abcdabcd', 'b', 2 ) returns 6
index( 'abcdabcd', 'b', -2 ) returns 2
left( Date, index( Date,'-') -1 ) where Date = 1997-07-14 returns 1997
mid( Date, index( Date, '-', 2 ) -2, 2 ) where Date = 1997-07-14 returns 07
this is beacuse ali is first word
Index(NAME,'ali')
for more see this
Position of a substring. This function gives the starting position of the n:th occurrence of substring s2 in string s1. If n is omitted, the first occurrence is assumed. If n is negative, the search is made starting from the end of string s1. The result is an integer. The positions in the string are numbered from 1 and up.
Examples:
index( 'abcdefg', 'a' ) returns 0
index( 'abcdefg', 'cd' ) returns 3
index( 'abcdabcd', 'b', 2 ) returns 6
index( 'abcdabcd', 'b', -2 ) returns 2
left( Date, index( Date,'-') -1 ) where Date = 1997-07-14 returns 1997
mid( Date, index( Date, '-', 2 ) -2, 2 ) where Date = 1997-07-14 returns 07
Hi,
It is case sensitive when use try like this
LOAD * Inline
[
Names
ali hammad ahmed
];
Index(NAME,'ali') //Because you use caps name ALI
Regards,
Anand
HI Hammad
Try this function
=FieldIndex('Name','harsha') if Name as Field and 'Harsha' as text to find
Regards
Harsha
Just a small addition as there is a fault within the result provided.
To test if a given substring exists within a string:
index( 'abcdefg', 'a' ) returns 1 (not 0)
index( 'abcdefg', 'x' ) returns 0 ('x' does not exist within the string)