Hi @AnneSanta_Maria1 ,
First of all thanks for sharing the sample data. This helped a lot to understand what you are after. Although I also answered your direct message, I wanted to share some thoughts on this challenge here available for the rest of the community too.
When editing a point in ArcGIS Pro, the attribute rule defined on this point layer can have access to the values found in a different layer (like the rooms of a floor in a building). However, the way the attribute rule has access to the other layer is through the $datastore and the datastore is the source of the data and has no knowledge of what floor is currently visualized in a map.
As I mentioned in my direct message, I believe the right way to go forward is to explore ArcGIS Indoors (https://www.esri.com/en-us/arcgis/products/arcgis-indoors/overview), since it comes with solutions to work with floors in a building and collect data for a specific location on a floor.
An alternative solution in ArcGIS Pro, would be to approach this as a 3D problem. You can visualize your building in a local scene, define the base elevation (based on your elevation field), and if desired, the extrusion, based on the floor to floor height. Define a range slider based on the floor and visualize the floor where you want to create a 3D point. This will snap to the base elevation of the floor. You can use the Z value of the point to query the floor polygons and then use the Intersects function to intersect your point with the floor to obtain the room polygon. This allows you to use the information of the room directly for your point in an Attribute Rule.
Below is the Attribute Rule I used:
// get the building polygons
var building = FeatureSetByName($datastore, "Buildings_Room", ['BldRecNbr', 'Floor', 'RmRecNbr', 'RmNbr'], false);
// extract the z value of the 3D point and get a min and max value (z-1ft and z+1ft)
var z = Geometry($feature)["z"];
var zmin = z-1;
var zmax = z+1;
// create query on elevation using Z value of 3D point
var sql = "Elevation > @zmin AND Elevation < @zmax";
// filter building polygons to get floor polygons
var CurrentFloor = Filter(building, sql);
// do 2D intersection of feature with floor polygons
var intersectingrooms = Intersects(CurrentFloor, $feature);
// read out values
if (Count(intersectingrooms) > 0) {
var intersectingroom = First(intersectingrooms);
return{
"result" : {
"attributes": {
"BldRecNbr": Right(intersectingroom.BldRecNbr, 5),
"Floor": intersectingroom["Floor"],
"RmRecNbr": intersectingroom.RmRecNbr,
"RmNbr": intersectingroom.RmNbr
}
}
}
}
...and a visualization of the result: