I have a table location and I want to find the fieldname as well as field number from the table. How can I do it?
I know the syntax of Fieldname function but don't know how to and where to place this syntax in the script to make it work.
Thanks in advance
you can pass the result to some field like
ID & FieldName(1,'Table1') as ID2,
I can add this anywhere in the script coz it throwing error is I add this as it is.
MapSq as MapSq.map
(ooxml, embedded labels, table is Sheet1);
Tag field MapSq.map with $geomultipolygon;
ID & FieldName(2,'test')as ID1
I tried let a= NoOfFields(location) in script.
But when still I am not able to see how many fields are there in this table.
your table has to be in memory.
So my table name 'Location ' is already used in the script. In this scenario how should I add it in the script.
select * from Location;
But I do not have this excel sheet.
Fieldname(2,'Location') as ID1
That should work. it will give you a table with one field named ID1 data would be in it the name of filed number 2. make sure you have field number two in the location table.
add from resident ....
That was just an example.
you can use something like that in your script
FieldName(2,'Your Table name') as NewFieldName
Retrieving data ...