Skip to main content
jyothidurgak0473
March 9, 2022
Question

select a user data by using piker field and auto populated user details in inline grid

  • March 9, 2022
  • 3 replies
  • 0 views

i need to select user by using piker fields and  auto populated the details (email, user name and Name) and saved into a inline grid

3 replies

gopalk2865
Participating Frequently
March 9, 2022

Hi Kalyan, you can use following approach to implement your requirement.

1. Once u select any value from picker ,save the identifier in a local variable.

2. Using this identifier , query your data using query entity.

3. Once you get the data , show these details in the  grid.

March 9, 2022

For example...

a!localVariables(
  local!user,
  local!pgInfo: a!pagingInfo(startIndex: 1, batchSize: 1),
  local!dataSet: todatasubset(local!user, local!pgInfo),
  {
    a!pickerFieldUsers(
      label: "User",
      value: local!user,
      saveInto: local!user,
      maxSelections: 1
    ),
    a!gridField(
      columns: a!forEach(
        items: { "email", "firstName", "lastName" },
        expression: a!gridColumn(
          label: proper(fv!item),
          value: user(fv!row, fv!item)
        )
      ),
      data: local!dataSet,
      pagingSaveInto: local!pgInfo,
      showWhen: not(a!isNullOrEmpty(local!user))
    )
  }
)

jyothidurgak0473
March 10, 2022

thank you