Select to view content in your preferred language

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

737
1
Jump to solution
10-12-2021 11:50 PM
DavidMrázek
Frequent Contributor

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
Frequent Contributor

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
Frequent Contributor

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

0 Kudos