Can i access database table value using a constant?

Hi,

 I have a table where username and password is stored , now in an interface i want to access password based on the username, can it be possible to access data from dB using a constant in the interface?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

     .

    a!queryEntity(
      entity: cons!TTC_USERDETAILS,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "userName",
              operator: "=",
              value: ri!userName
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 50,
          sort: a!sortInfo(
            field: "userId",
            ascending: true
          )
        )
      ),
      fetchTotalCount: false
    )

    By using a!queryentity we will fetch the data from the back end tables and directly we can use this expressions in the interface. for better understanding

    please go through the above code .

Reply
  • 0
    Certified Senior Developer

     .

    a!queryEntity(
      entity: cons!TTC_USERDETAILS,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "userName",
              operator: "=",
              value: ri!userName
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 50,
          sort: a!sortInfo(
            field: "userId",
            ascending: true
          )
        )
      ),
      fetchTotalCount: false
    )

    By using a!queryentity we will fetch the data from the back end tables and directly we can use this expressions in the interface. for better understanding

    please go through the above code .

Children
No Data