A Note About Form Load Alerts and Segments
By default, Form Load alerts return data from all segments that the current user has access to. When you create a new Form Load alert, you might want to restrict the results of this query to a single segment.
For example, if you want to get the total count of pending work orders across all segments, then your SQL looks like this:
SELECT vWorkOrders.WONumber ROM vWorkOrders WHERE vWorkOrders.StatusCode = 'PENDG'
This SQL statement will return the work order numbers of each pending work order in the entire TMS database. However, if you want to restrict this data to the current segment, then you can change your SQL so that it looks like this:
SELECT vWorkOrders.WONumber FROM vWorkOrders WHERE vWorkOrders.IDSegment = '{vWorkOrders.IDSegment}' and vWorkOrders.StatusCode = 'PENDG'
Adding "vWorkOrders.IDSegment = '{vWorkOrders.IDSegment}'" to the SQL statement limits the number of segments that the alert pulls data from.