Geo Point Field Type | ServiceNow® Vancouver Platform Field Administration Demo
hello everyone good day today we are going to discuss about a new vanco feature that is z point field type so these data type will store the longitude and latitude coordinates let me share my screen so that we can have a quick glance in the instance not only that this longitude and latitude pairs will help technicians to find the location of a part in a warehouse let's open any one of the table or you can create your own table and you need to create Fields based off data type let me open one of the field which I have created I have created two Fields with the Z Point as a data type let me open one and here you can see location one and data type is0 point in data types you can see value as 0 point you can select that and and you can submit the field or save it so let's check this field on the form here you can see I'm opening the incident form so I will go with any one of the field uh record so here you can see location one and location 2 for 0 point data type let me give it us few values so these location values will take like 0 point values will take up to six decimals of precision not only that first value will be the longitude value and second value will be the latitude value so let me give here also so I'm giving here 20 and 10 without any decimal value so it should populate automatically up to 6 decimal values let me save this so here you can see in this way it will take in Brackets first one longitude and second one latitude not only that longitude values can be ranged up to - 180 to 180 and latitude ranges up to - 90 to + 90 so after doing this we have one more function called distance underscore sphere so it will C calculate the distance between two locations like these two 0 point locations let's see how it how we can do that so I I created a field with integer data type and I enable the function field here here you can see you can enable function field after enabling the function field you will be having function definition under function definition you can write Glide functions and distance underscore sphere and two G Point Fields this is how you need to write this function and this is the syntax to do it distance underscore spere we calculate the distance between two Z point locations so let me go on to the form here you can see we have calculate distance as a field and it is a value coming from distance underscore spere after calculating with these two locations it will take two longitudes and two latitudes and it and it will give a distance paare value in the calculate distance field not only that we can write script based on distance underscore sphere let's check there I already written one script and here you can see I'm giving a constant variable I'm defining it and here you can see Glide function and distance pair with those those two location values and I'm gliding an incident record and this is a function and you need to give it as ADD function method and I'm querying it and here you can see you will get all the incident records with distance pair values which has 0 point values in location one and location two let me run this script so you can clearly see it out and see here you can see for many of the records we don't have location one and location two values we have three to four records so here you can see all those record values this is a distance pair value this is how we can calculate with script also not only that we have one more API related to this particular GE Point let let me go through that so that we can script by using that API that is Glide GE Point API let me write a short script on that I'm defining variable G Point equal to new new Glide Zer point is our API by using this particular API you can get the longitude or latitude values so I'm giving latitude and longitude values here and let me print this so that we can have a quick look I'm giving it a 0 point so let's run this it should print the values so here you can see 135 and - 64 with it is also printing with decimal values up to six digits let me get the longitude or latitude values here 0 point Dot and we can get latitude and longitude values by using get longitude longitude of and this is a method to get the longitud longitude value let me get latitude also and this is how get longitude and get latitude works let me give it here longitude point and latitude point so run the script so it need to give longitude and latitude see first one will be the longitude and second one is the L latitude this is how it works longitude and latitude so we can use Glide GE API to get the values this is how G Point works thank [Music] you [Music]
https://www.youtube.com/watch?v=TAJ8x4BaSzg