Validating the login interface credentials

i have created and stored the user registration details into the database.Now I have to validate those stored credentials with the credentials that user enters during the login process.Could any one help me like validating the details ?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Actually I have created a user management app in appian in that I have created registration and login page interface and trying to validate them

  • Got you.

    Here is the way you can follow.

    1. Get username of logged in username by function loggedInuser() and store in one local variable.
    2. Use above local to query from DB via a query entity which takes input as username and query a row from DB and store it into another local variable
    3. Now the field where the user enters credentials is getting saved/store into other variables.
    4. So in the validation part of the field of "Username" and "Password", you can compare.
    5. if it matches then no msg to display else say username/password is wrong


    Or instead of validating at the field level, you can do validation at form label as well when a user hit on submit button


    Let me know if you are unclear anywhere

  • Thanks Dhananjay I will try this thing and reply you back once it is done

  • Hey were you able to achieve what you were expecting?

  • Yes Thank you I was successful in getting that data.

  • Can you share a sample expression for the login interface

  • 0
    Certified Lead Developer
    in reply to aniketj0001

    What do you want to achieve?

    To get any access to Appian you already have to log in. There is nothing like a "custom login page" in Appian.

  • I am creating own custom login page interface and trying to validate them

  • 0
    Certified Lead Developer
    in reply to aniketj0001

    What exactly do you mean with "own custom login page"?

  • Hi...

    For delete record from grid and also from DB I have created this type of interface

    ------------------------------------

    a!localVariables(
    local!selection,
    local!selectedRows,
    local!removedIds,
    {
    a!buttonArrayLayout(
    buttons: {
    a!buttonWidget(
    label: "REMOVE",
    saveinto: {
    a!save(
    local!removedIds,
    append(
    local!removedIds,
    local!selectedRows['recordType!PRA Patient Submission.fields.id']
    )
    ),
    a!save(local!selectedRows, null),
    a!save(local!selection, null)
    },
    style: "NORMAL",
    disabled: if(
    or(
    isnull(local!selectedRows),
    length(local!selectedRows) < 1
    ),
    true,
    false
    )
    )
    },
    align: "START"
    ),
    a!gridField(
    label: "Patient Details",
    labelPosition: "ABOVE",
    data: a!queryEntity(
    entity: cons!PRA_DSE_PATIENTLOG,
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(field: "Id"),
    a!queryColumn(field: "firstName"),
    a!queryColumn(field: "lastName"),
    a!queryColumn(field: "dob"),
    a!queryColumn(field: "gender"),
    a!queryColumn(field: "address"),
    a!queryColumn(field: "zipCode"),
    a!queryColumn(field: "email")
    }
    ),
    pagingInfo: fv!pagingInfo
    ),
    fetchTotalCount: true
    ),
    columns: {
    a!gridColumn(
    label: "Id",
    sortField: "Id",
    value: fv!row.Id,
    align: "END"
    ),
    a!gridColumn(
    label: "First Name",
    sortField: "firstName",
    value: fv!row.firstName
    ),
    a!gridColumn(
    label: "Last Name",
    sortField: "lastName",
    value: fv!row.lastName
    ),
    a!gridColumn(
    label: "Dob",
    sortField: "dob",
    value: fv!row.dob,
    align: "END"
    ),
    a!gridColumn(
    label: "Gender",
    sortField: "gender",
    value: fv!row.gender
    ),
    a!gridColumn(
    label: "Address",
    sortField: "address",
    value: fv!row.address
    ),
    a!gridColumn(
    label: "Zip Code",
    sortField: "zipCode",
    value: fv!row.zipCode,
    align: "END"
    ),
    a!gridColumn(
    label: "Email",
    sortField: "email",
    value: fv!row.email
    )
    },

    selectable: true,
    selectionStyle: "ROW_HIGHLIGHT",
    selectionValue: local!selection,
    selectionSaveInto: {
    local!selection,
    a!save(
    local!selectedRows,
    append(local!selectedRows, fv!selectedRows)
    ),
    a!save(
    local!selectedRows,
    difference(local!selectedRows, fv!deselectedRows)
    ),


    a!save(
    local!removedIds,
    append(local!removedIds, fv!selectedRows)
    ),
    a!save(
    local!removedIds,
    difference(local!removedIds, fv!deselectedRows)
    )

    },

    )
    }
    )

    -----------------------------------------------------------------------

    Getting Error---

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error [evaluation ID = e14e3:43de1] : An error occurred while executing a save: Expression evaluation error at function 'append' parameter 2 [line 13]: Invalid index type: Record field uuid: 1bd64c1b-12c9-47e0-bcf7-b2bf9dc77276 Record type uuid: 6fb016a4-87b5-41fc-a055-bf098af64dc9 Relationship path: null