How do I find part of the unknown text in the attribute table?

248
1
Jump to solution
10-12-2021 11:50 PM
DavidMrázek
Occasional Contributor II

Good day,
I'm trying to use c # to find in the attribute table the text for which I only know the beginning and I would need to find all the values ​​that correspond to it.
The code itself is not a problem, I just don't know how to replace the part I don't know. Thank you all for your advice.

protected override async void OnClick()
{
await QueuedTask.Run(() =>
{
FeatureLayer fl = MapView.Active.Map.FindLayers("O_Klad_ZTM10").First() as FeatureLayer;
QueryFilter qf = new QueryFilter();
string whereClause = "ZTM10_nom = '0602-***'"; //stars mean the part I don't know
qf.WhereClause = whereClause;

using (RowCursor rowCursor = fl.Search(qf))
{
while (rowCursor.MoveNext())
{
fl.Select(qf);
}
}
});
}

 The picture shows the part of the column in which I look for values ​​and what they look like.

0 Kudos
1 Solution

Accepted Solutions
DavidMrázek
Occasional Contributor II

Just use SelectByAtributtes to enter what you are looking for and turn on sql.

View solution in original post

0 Kudos
1 Reply
DavidMrázek
Occasional Contributor II

Just use SelectByAtributtes to enter what you are looking for and turn on sql.

0 Kudos