Guide Skipping Step - No Element Even though there is an element

Comments

9 comments

  • Avatar
    Howard Lio

    Hi David Marshall,

    Sorry to hear that you're not able to get the snippet (skip step no element) working properly for your guide. I'm guessing you are seeing similar problems if you try using another similar snippet here?

    Hope that others in the Community can chime in if they've seen similar issues and have ideas for solving, but if you do need to contact our Professional Services team, they can inspect your guide and work further to check on the JS snippet for you. 

    1
    Comment actions Permalink
  • Avatar
    David Marshall

    Hey Howard, 

    Thank you very much for responding and I will try the snippet that you have provided. I really appreciate it!!

    0
    Comment actions Permalink
  • Avatar
    David Marshall

    Just to just to follow up, I am still having issues with the guide as described in my original post. Would anyone know of or has a timing snippet that I can add to the guide? Also, if anyone has any other suggestions, please let me know. 

     

    0
    Comment actions Permalink
  • Avatar
    Howard Lio

    Hi David Marshall,

    Thanks for your follow up and sorry to respond with another snippet but this is the closest we have in terms of "timing" or delaying a guide step:

    https://github.com/pendo-io/snippets/blob/master/guides/delayGuide/delayGuideDisplay/delayGuideDisplay.js

    I'm not as familiar with combining these two aspects of the snippet with the timing part, but this might be something to consult with our professional services team if you're interested for more guidance. 

    Hope this at least gets you a little closer! Thanks Howard

    0
    Comment actions Permalink
  • Avatar
    David Marshall

    Thanks for the quick response. I really appreciate it. I will try the snippet on the guide to see what happens. Enjoy Pendorama!!

    0
    Comment actions Permalink
  • Avatar
    Nikki Murray

    Has anyone ever figured this out? No matter which skip variation I use, it stops the tour dead if the element IS there.

    0
    Comment actions Permalink
  • Avatar
    David Marshall

    Not yet, I will work on this guide some more either today or tomorrow to see if I can figure out anything. 

     

    0
    Comment actions Permalink
  • Avatar
    Meghann MacDonald

    Hi all, trying to work on this from https://github.com/pendo-io/snippets/blob/master/guides/goToGuideStep/goToStepNoElement/gotoStepNoElement.js

     

    Is there anything that needs to be replaced or filled in in his code here besides var desired step = 5?

    (functiongoToStepNoElement(){
      // Warning: .getPositionOfStep() is 1-based
      varnextStep=guide.steps[guide.getPositionOfStep(step)];
       
      // The step of your guide you would like to go to when the element of the subsequent step isn't present
      vardesiredStep=5;//<--Step number as displayed in Pendo
       
      /* If you must defer this to guide load time or if the element is not already visible
      pendo._.defer(function(){setTimeout(function checkElementAndSkip() {*/
      (functioncheckElementAndSkip(){
      varresults=pendo.Sizzle(nextStep.elementPathRule);
      if(results.length===0||!pendo._.some(results,pendo.isElementVisible)){
      pendo.log(guide.id+':advance to designated step');
       
      // Use the line below if you don't want to utilize the Step ID directly and would rather use the step count
      pendo.goToStep({destinationStepId: pendo.getActiveGuide().guide.steps[desiredStep-1].id});
       
      // Use the line below if you know the specific Step ID (generally a stronger reference)
      //pendo.goToStep({destinationStepId: "N9d7QgG8ZxOBqeUmZr4dn92yltE"}); <-- Example Step ID
      }else{
      pendo.log(guide.id+':advance 1 step');
      pendo.onGuideAdvanced(step);
      }
      })();
    My error may be because i have to defer to the guide load time (the element isn't visible) but I get a syntax error when i cut the */ and paste it after the 'visible' so I think there is additional syntax needed.

    })();

     

    Thanks so much!

    0
    Comment actions Permalink
  • Avatar
    David Marshall

    At first the only change was vardesiredStep = #. However, some of the guides that I was working on was having timing issues. Working with Mark Goings, Eric Miller, and Kristine Enerio, there following change was made (in bold). 

    // GoTo a specific step if no Element visible
    (function goToStepNoElement() {
    // Warning: .getPositionOfStep() is 1-based
    var nextStep = guide.steps[guide.getPositionOfStep(step)];

    // The step of your guide you would like to go to when the element of the subsequent step isn't present
    var desiredStep = 18; //<--Step number as displayed in Pendo

    /* If you must defer this to guide load time or if the element is not already visible
    pendo._.defer(function(){setTimeout(function checkElementAndSkip() {*/
    (function checkElementAndSkip() {
    var results = pendo.Sizzle('[data-bind*="gridModel.hasSecurityFeatures() "][style="display: none;"]');
    if (results.length > 0 || pendo._.some(results, pendo.isElementVisible)) {
    pendo.log(guide.id + ':advance to designated step');

    // Use the line below if you don't want to utilize the Step ID directly and would rather use the step count
    pendo.goToStep({destinationStepId: pendo.getActiveGuide().guide.steps[desiredStep-1].id});

    // Use the line below if you know the specific Step ID (generally a stronger reference)
    //pendo.goToStep({destinationStepId: "N9d7QgG8ZxOBqeUmZr4dn92yltE"}); <-- Example Step ID
    } else {
    pendo.log(guide.id + ':advance 1 step');
    pendo.onGuideAdvanced();
    }
    })();
    })();

    That change helped with the timing issue that I was having. Hopefully this helps. 

    0
    Comment actions Permalink

Please sign in to leave a comment.