Alpha Video Training
Results 1 to 7 of 7

Thread: Google Map Method (UX Component)

  1. #1
    Member
    Real Name
    Mark Moss
    Join Date
    Aug 2015
    Posts
    37

    Default Google Map Method (UX Component)

    In the Google Map Method (UX Component), edit actions, Add Multiple Markers, Marker detail, How would I add a conditional statement to the Last Line where I would want to say -- if ds.data(

  2. #2
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,115

    Default Re: Google Map Method (UX Component)

    you might want to explain a bit more what is happening in the if statement, it might be that the condition would be better suited in the lists field properties rather than the marker detail if that makes sense. For instance I have a dynamic image that shows a certain image depending on what type of species that job is related to. That image is determined in the list of fields in the properties of the dynamic image, you can also set colors, fonts etc based on if statements in the conditional styles in the field properties.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  3. #3
    Member
    Real Name
    Mark Moss
    Join Date
    Aug 2015
    Posts
    37

    Default Re: Google Map Method (UX Component)

    Charles,

    Thank you so much for responding to my question,

    I have a field named "Days Since Last Service" and if the Value of that Field Less than FIVE, I do not want to display it in the Marker Detail.

    Do you know a way to accomplish this?

    Mark

  4. #4
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,115

    Default Re: Google Map Method (UX Component)

    You could filter the list based on that criteria then open the map to display those records. Are you wanting to NOT display the field or the particular row?
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  5. #5
    Member
    Real Name
    Mark Moss
    Join Date
    Aug 2015
    Posts
    37

    Default Re: Google Map Method (UX Component)

    Charles,

    Again thank you for responding to my question,

    We want to display all of the records on the map regardless of the state of the "Days Since Last Service" Field, but we only want to display it in the Marker Detail message is if it is ">= to 5", for all others they will not see the "Days Since Last Service" Field Displayed.


    Mark
    Last edited by markemoss; 09-09-2019 at 11:49 PM. Reason: Bad wording

  6. #6
    Member
    Real Name
    Mark Moss
    Join Date
    Aug 2015
    Posts
    37

    Default Re: Google Map Method (UX Component)

    {js_escape(ds.data("Chain_Name"))}<br>
    {js_escape(ds.data("Store_Name"))}<br>
    {js_escape(ds.data("Contact_Name"))}<br>
    {js_escape(ds.data("Phone"))}<br>
    {js_escape(ds.data("Address_1"))}<br>
    {js_escape(ds.data("City"))}, {js_escape(ds.data("state"))} {js_escape(ds.data("ZIP"))}<br>
    <br>
    {js_escape(ds.data("Status"))}
    <br>

    if ( {js_escape(ds.data("Days_Awaiting_Service"))} >= 20 )
    { <strong><span style="color: #ff0000;">Days Awaiting Service: {js_escape(ds.data("Days_Awaiting_Service"))}</span></strong></p><br> }

    <script type="text/javascript">
    var DAS = {js_escape(ds.data("Days_Awaiting_Service"))};
    if ( DAS >= 20 )
    { document.write('<strong><span style="color: #ff0000;">Days Awaiting Service: DAS</span></strong></p><br>' ) };
    </script>


    //===============================================================================================//


    What I get is the following

    ACTIVE

    if (50 >= 20) { Days Awaiting Service: 50


    }

    I do not want to see the "if (50 >= 20) {"

    and I do not want to see anything if the value is less than 20

    Any help would be greatly appreciated.


    Mark

  7. #7
    Member
    Real Name
    Mark Moss
    Join Date
    Aug 2015
    Posts
    37

    Default Re: Google Map Method (UX Component)

    {js_escape(ds.data("Chain_Name"))}<br>
    {js_escape(ds.data("Store_Name"))}<br>
    {js_escape(ds.data("Contact_Name"))}<br>
    {js_escape(ds.data("Phone"))}<br>
    {js_escape(ds.data("Address_1"))}<br>
    {js_escape(ds.data("City"))}, {js_escape(ds.data("state"))} {js_escape(ds.data("ZIP"))}<br>
    <br>
    {js_escape(ds.data("Status"))}
    <br>


    if ( {js_escape(ds.data("Days_Awaiting_Service"))} >= 20 )
    { <strong><span style="color: #ff0000;">1 - Days Awaiting Service: {js_escape(ds.data("Days_Awaiting_Service"))}</span></strong></p><br> }


    <script type="text/javascript">
    var DAS = {js_escape(ds.data("Days_Awaiting_Service"))};
    if ( DAS >= 20 )
    { document.write('<strong><span style="color: #ff0000;">2 - Days Awaiting Service: DAS</span></strong></p><br>' ) };
    </script>


    <script type="text/javascript">
    var DAS = {js_escape(ds.data("Days_Awaiting_Service"))};
    if ( DAS >= 20 )
    { document.write('<strong><span style="color: #ff0000;">3 - Days Awaiting Service: DAS</span></strong></p><br>' ) };
    else
    { document.write('Not Awaiting Service') };
    </script>



    //===============================================================================================//


    What I get is the following

    ACTIVE

    if (50 >= 20) { Days Awaiting Service: 50


    }


    I tried a couple of ways to try to get this to work and if you look at the HTML output they are "1 - Days Awaiting Service", "2 - Days Awaiting Service", "3 - Days Awaiting Service".

    The only one that outputs anything is the "1 - Days Awaiting Service"

    If the value of DAS is >= 20 it puts out "if (50 >= 20) { Days Awaiting Service: 50 }"

    If the value of DAS is < 20 it puts out "if (>= 20) { Days Awaiting Service: 50 }"



    Anyone have a solution to this problem?


    Mark




    Mark

Similar Threads

  1. Adding Google "My Places" Data to a Google Map Component
    By rbaas in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 10-03-2014, 10:46 AM
  2. ajax call back method is not calling in google chrome and In IE versions it is worki
    By satyanarayana in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 05-13-2013, 07:44 PM
  3. Does Alpha provide a method to lock orientation in a UX component?
    By coleresources in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 03-20-2013, 05:55 PM
  4. Dialog Component method - Open all accordian tabs... Any luck?
    By marvinbase in forum Application Server Version 11 - Web/Browser Applications
    Replies: 6
    Last Post: 01-08-2013, 03:07 PM
  5. Grid Component - New Method to Set Choices in DropdownBox Control
    By kingcarol in forum Application Server Version 10 - Web/Browser Applications
    Replies: 14
    Last Post: 03-17-2011, 07:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •