<div dir="ltr"><div><div><div>I believe you need to do a custom function for that, you can use the function editor and add this:<br><br>@qgsfunction(args='auto', group='Custom')<br>def split(string, separator, index, feature, parent):<br> return string.split(separator)[index]<br><br></div>And you use it like this:<br></div>split("FieldName",',',1) --> cat<br>split("FieldName",',',2) --> spider<br><br></div>Alexandre Neto<br><div><div><br><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Piotr Kania <<a href="mailto:p.kania@op.pl">p.kania@op.pl</a>> escreveu no dia quarta, 3/02/2016 às 16:56:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
I try to find "Qgis way" to achieve the same as those arcmap field's<br>
calculator command: SPLIT( [FieldName],",")(0) - in that case "," is a<br>
separator, so from a string 'dog,cat,spider' I will get 'dog' - as it is<br>
the first element, counted as "zero" - 'cat' is number 1, 'spider'<br>
number 2 etc. So:<br>
<br>
SPLIT( [FieldName],",")(1) -> 'cat'<br>
SPLIT( [FieldName],",")(2) -> 'spider'<br>
<br>
Thanks for any response<br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><div dir="ltr">-- <br></div><div dir="ltr"><div>Alexandre Neto</div><div>---------------------</div><div>@AlexNetoGeo</div><div><a href="http://sigsemgrilhetas.wordpress.com">http://sigsemgrilhetas.wordpress.com</a></div><a href="http://gisunchained.wordpress.com">http://gisunchained.wordpress.com</a><br></div>