Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Need Show name of the person who booked the space & username to be default onload map view

Snowdeveloper03
Tera Contributor

Need Show name of the person who booked the space  to be default on onload map view itself and username who booked the reservation should be displayed on the map when on load itself.

 

 https://www.servicenow.com/docs/bundle/yokohama-employee-service-management/page/product/wsd-reserva... 

  1. On the Map view, select the location, building, and a floor where you have made the reservation.
  2. Select the map gear settings icon to view Display options.
  3. Select Show name of the person who booked the space.
  4. Select Apply.

    Reserved or booked spaces show the name of person who booked the space but i want this option to be default and name of person who booked the space should be visible at the time of page loading itself.

    when i tried i can make Display options to be defaulted to "Show name of the person who booked the space" but only after clicking apply name is getting visible. Please let me know if anyone has worked and achieve this

    mapSettings Angular provider(service) -https://devxx.service-now.com/sp_angular_provider.do?sys_id=e74fc231532e6110fd72ddeeff7b12b8

3 REPLIES 3

_raj_esh
Kilo Sage

Hi @Snowdeveloper03 

 

Can you try the following?

 

Line number 130 

 

 $ctrl.previousOptionSelected = {
            value: findInitiallyselectedOption($ctrl.selectedSpaceNamesValues) || SPACE_NAMES_OPTIONS.none,
        };

 

Change to following

 

$ctrl.previousOptionSelected = {
  value: findInitiallyselectedOption($ctrl.selectedSpaceNamesValues)
         || SPACE_NAMES_OPTIONS.booked_by_someone
};

 

Note: this will be part of customization, for every release you may have to check if any new lines of code added to the angular provider file. 

 

Hope it helps.

--Raj | ServiceNow Certified Technical Architect

Hi @_raj_esh ,

It does not work with the above mentioned changes as the form does not set the default value to "

Show name of the person who booked the space only" in the radio button.

 

NOONEA
Tera Contributor

Hi @Snowdeveloper03 ,

You can actually achieve this natively via Map Properties without writing any custom scripts.

Please follow these quick steps:

Navigate to Space Mapping > Map properties.

Find the property: "Configure the default value being used to display labels on the map in the reservation experience".

Change the dropdown value to Reserved user or Assigned user based on your requirement.

Ensure "Enable display of permanent seat assignments on map (sn_wsd_space_map.display_seat_assignment) is set to Yes.

This will automatically change the map view default on load, allowing users to see the booking names or assigned user names instantly without needing to click the gear icon every time.

Hope it helps!!