Visual Builder

Get Involved. Join the Conversation.

Topic

    M Sridhar
    UserName from VBCS( OIC) Login ScreenAnswered
    Topic posted February 5, 2019 by M SridharSilver Medal: 2,000+ Points, tagged Custom Code, JET, REST, Services, UI, Validation, Web 
    317 Views, 14 Comments
    Title:
    UserName from VBCS( OIC) Login Screen
    Summary:
    UserName from VBCS( OIC) Login Screen
    Content:

    How to get a username to pass it one more REST service....with Basic Authentication enabled for the login screen..

    Best Comment

    JT Thomas

    That's the source view. Variables are found in the application at the app, flow, or page scope level. You access them either in an action chain or in custom Javascript. The screen shot I just shared shows accessing it via the assign variables action in an action chain.

    ~/jt

    Comment

     

    • JT Thomas

      You want to capture a username/password in a form to pass to a service using Basic Auth?

      ~/jt

      • M Sridhar

        I just need the user name for the logged in form session...

      • M Sridhar

        When we develop the web application in VBCS and make it to Stage->Live, it gives URL for that web application...

        User will login to the web application using OIC credentials....I want to capure OIC user name....

    • JT Thomas

      Thanks for clarifying. That is kept in a system variable called "user.userId" - see attached screenshot.

       

      • M Sridhar

        Sorry, I don't see it in my application - Can you pls navigate me through....Attaching screen shot

    • JT Thomas

      That's the source view. Variables are found in the application at the app, flow, or page scope level. You access them either in an action chain or in custom Javascript. The screen shot I just shared shows accessing it via the assign variables action in an action chain.

      ~/jt

    • M Sridhar

      I get this error if I use it JS file - : $application.user.userid

      $application is not defined ReferenceError: $application is not defined

      • JT Thomas

        Right, page variables are not directly accessible to minimize unintended side effects since action chains are fully asynchronous. As I mentioned in my other reply you need to pass it to your custom function as a parameter, then access it as that parameter variable. 

        ~/jt

    • JT Thomas

      As in the username used to log in? I don't think that's exposed unless they use their email address to login. full name has user first and last name. 

      ~/jt

      • M Sridhar

        Yes. I am going by the assumption, for our Oracle Cloud account - email  will be used as username...Thanks!

    • aaina Khan

      Hi

      How do I validate the user input (userid) with that of the available userids stored in business objects? Is there any specific method to do this authentication of user and if so, can we maintain the session for that userid?

      One approach I tried is custom filter. i.e. I tried to display the userid in a table below the user id input field by mapping the input variable to the tableSDP. Which shows if the value if present in BO. If not, it displays "No Data to display" In that I am unable to identify how to use conditional navigation to navigate to next page if validation pass and stay there and show error if failed. Please guide me through this. thanks in advance.