Create a filter using Text Field to fetch the particular details in grid

Hi ,

Actually , I have argent requirement that i need to create a filter using text field but I'm not able to archive ... 

here is my code  

load(
  local!fetch,
  local!pagingInfo:a!pagingInfo(
    startIndex:1, 
    batchSize: cons!batch_no, 
    sort:a!sortInfo( field:"projId", ascending:true())),
    
    
  
with(
  local!StudentsData:a!queryEntity(
  entity:cons!RQA_double_item_ENTITY, 
  query:a!query(
    filter:a!queryFilter(
      field:"field", 
      operator:"=", 
      value:ri!PorjectID
    ),
    pagingInfo:local!pagingInfo
    
  ),
  fetchTotalCount: true()
),
{
  a!sectionLayout(
      label: "Fetch Details",
      contents: {
        a!columnsLayout(
          columns: {
          a!columnLayout(
            contents: {
            
              a!textField(
                label: "Students ID",
                required: true(),
                value: local!fetch,
                saveInto: local!fetch
               
              ),
            a!buttonArrayLayout(
              buttons: {
                a!buttonWidget(
                  label: "Search",
                  value: local!fetch,
                  submit: true()
                  
                  
                )
              },
              align: "START"
            )
     
           } 
          ),
          }
        )
    }
    ),
a!sectionLayout(
      label: "Students Details",
      contents:{ 
if(rule!RQA_checkIsNullOrEmpty(local!StudentsData),
a!richTextDisplayField(label:"",value: "No Data Available"),
a!gridField(
  label: "",
 
  totalCount:local!StudentsData.totalCount,
  
  
  columns: {
    if(rf!requesttype=cons!RQA_VALUES[1],
    a!gridTextColumn(
      label: "Students ID",
      field: "student",
      data: index(local!StudentsData.data,"student",{}),
      alignment: "CENTER"
   ),{}),
   a!gridTextColumn(
     label: "ClassID",
     field: "classid",
     data: index(local!StudentsData.data,"classid",null),
     alignment: "CENTER"
     ),
   ...
   ..
   ..
   ...
   ..
   ..
   ..
       },
     value: local!pagingInfo,
      saveInto: local!pagingInfo,
      rowHeader: 1
          /*selection: true()*/
)
 )
},
isCollapsible:true())
}
)

)

  Discussion posts and replies are publicly visible

Parents Reply
  • load(
      local!field,
      local!ascending: true(),
      local!pagingInfo: a!pagingInfo(
        startIndex: 1,
        batchSize: - 1,
        sort: a!sortInfo(
          field: if(
            isnull(
              local!field
            ),
            "id",
            local!field
          ),
          ascending: local!ascending
        )
      ),
      local!sampleData: {
        {
          name: "ABC",
          id: 2
        },
        {
          name: "XYZ",
          id: 1
        }
      },
      {
        a!textField(
          label: "Field",
          value: local!field,
          saveInto: {
            local!field,
            a!save(
              local!pagingInfo,
              a!pagingInfo(
                startIndex: 1,
                batchSize: - 1,
                sort: a!sortInfo(
                  field: local!field,
                  ascending: local!ascending
                )
              )
            )
          }
        ),
        with(
          local!datasubset: todatasubset(
            local!sampleData,
            local!pagingInfo
          ),
          local!dataForCurrentPage: local!datasubset.data,
          {
            a!gridField(
              label: "",
              totalCount: length(
                local!sampleData
              ),
              columns: {
                a!gridTextColumn(
                  label: "Name",
                  field: "name",
                  data: local!dataForCurrentPage.name,
                  alignment: "LEFT"
                ),
                a!gridTextColumn(
                  label: "ID",
                  field: "id",
                  data: local!dataForCurrentPage.id,
                  alignment: "LEFT"
                )
              },
              value: local!pagingInfo,
              saveInto: local!pagingInfo
            )
          }
        )
      }
    )

    check given code ,first by default it will sort on id  and if you give any value in text filed then it will sort on that value 

Children
No Data