I created a paging grid and want one or more selections. I used a query rule t

I created a paging grid and want one or more selections. I used a query rule to populate the CDT of multiple type. using todataset to display the data in a paging grid.

I setup an array to accept the selection values of integer type.

Surprise one was I got the index value instead of the primary key value. From reading it looks like if I used a query rule in stead of todataset then that would have happened. Please confirm this.

Next. In the array - if I chose one value, I get always an additional row which shows a zero. If you later use an index for this value to get the real data, you would error out. Do I ldrop() the first row so I avoided the error.

I am validating this sounds correct. I am surprised the zero row shows up. Are you?
Thank You
Keith...

OriginalPostID-118318

OriginalPostID-118318

  Discussion posts and replies are publicly visible

Parents
  • From your explanation, I think you are populating an activity class parameter on the data tab with a query rule. Using an activity class parameter in the todatasubset() function for the grid definition will use the index position for selected values as found.

    To get the primary key naturally, the query rule must be in the actual todatasubset() function for the grid definition on the form itself (not the data tab).

    As for the extra zero selection, that would not be the behavior I would expect. If possible, I would suggest recreating the grid component on the form and seeing if that fixes it. Someone else on here may have more experience with this type of behavior.
Reply
  • From your explanation, I think you are populating an activity class parameter on the data tab with a query rule. Using an activity class parameter in the todatasubset() function for the grid definition will use the index position for selected values as found.

    To get the primary key naturally, the query rule must be in the actual todatasubset() function for the grid definition on the form itself (not the data tab).

    As for the extra zero selection, that would not be the behavior I would expect. If possible, I would suggest recreating the grid component on the form and seeing if that fixes it. Someone else on here may have more experience with this type of behavior.
Children
No Data