Conditional: How to judge on what screen are you on

  • Roman Moraru
        Has successfully completed the online course Basics (100)
      2 years ago #34300

      Hello,

      in process designer if you were to implement an conditional that is supposed to check, on what type of screen are you, how can you do it?

      Problems: The URL doesn’t change it’s structure from screen to screen, so how can you judge on what screen are you on?

      Jennifer Häfner
          Has successfully completed the online course Intermediate (200)
          Has successfully completed the online course Advanced (300)
          Has successfully completed the online course Basics (100)
          Has successfully completed the online course Advanced (310)
          Has successfully completed the online course Advanced (320)
          Has successfully completed the Intermediate Certification
          Has successfully completed the Advanced Certification
        2 years ago #34302
        Up
        1
        Down
        ::

        Hi Roman,

        For that purpose, you could create a new Global Variable where you store the current screen name. For example, when navigating to the screen ‘Details’, add a UI action shape to the navigation process, where you set the value of the Global Variable to the constant ‘Details’.

        When doing this with every screen navigation, the Global Variable always contains the current screen.

        Then, for your condition to check the current screen, you can use a condition shape and compare the Global Variable to the screen names.

        I attached screenshots of the suggested implementation. I hope this helps!

        Attachments:
        You must be logged in to view attached files.
        Armin Winkler
            Has successfully completed the online course Introduction
            Has successfully completed the online course Intermediate (200)
            Has successfully completed the online course Advanced (300)
            Has successfully completed the online course Basics (100)
          2 years ago #34331
          Up
          1
          Down
          ::

          Hi Roman,

           

          adding to Jennifer’s reply: Inside of script activities you can also check for the current screen via this code statement: ‘this.getView().getId()’ Please note, however, that if you are subscribing to widget events fired from a popup context, this statement will return the ID of the screen on top of which the popup was opened instead of the popups screen.

           

          Kind regards,

          Armin

        Viewing 3 posts - 1 through 3 (of 3 total)

        You must be logged in to reply to this topic.