Unable to get selected checkbox value from table records in server action

Unable to get selected checkbox value from table records in server action to updated record in a database, I have assigned boolean value attribute to checkbox. after debugging I can see in a server action its returning false value 


1.

2.


4. In a server action I have passed following list to  foreach 

SyntaxEditor Code Snippet

DocumentManagementTable.List

5. In a debugger you can see selected record value is False

Solution

Hi,

If you check for aggregate I do not think it will have value, instead you should checkable widget list; try checking for DocumentManagementTable.List.Current.Boolean.Value

Regards.

Solution

Prasad Rao wrote:

Hi,

If you check for aggregate I do not think it will have value, instead you should checkable widget list; try checking for DocumentManagementTable.List.Current.Boolean.Value

Regards.


I dont want value from aggregate,it should show me user selected checkbox value, you can see attached step no 5

Hi,

You can update record when the user clicks (OnChange action).

Hello Afaque,


You are correct that the one from the aggregate is different from the one in the table.

Given that, I think you are checking the wrong value in Step 5.

Have you tried checking

DocumentManagementTable.List.Current.Boolean.Value

instead of 

GetDocumentManagementsByProjectId.List.Current.Boolean.Value

?


BTW, this is just like what Prasad has mentioned.


Hope this helps!

- Emman

Afaque Shaikh wrote:

Unable to get selected checkbox value from table records in server action to updated record in a database, I have assigned boolean value attribute to checkbox. after debugging I can see in a server action its returning false value 


1.

2.


4. In a server action I have passed following list to  foreach 

SyntaxEditor Code Snippet

DocumentManagementTable.List

5. In a debugger you can see selected record value is False

Hi Afaque,

Your Boolean value must be related to the record list that you are iterating. It seems that your Boolean value do no have any reference with documentManagementtable.list.

It should be like documentManagementtable.list.current.Boolean.Value

please check it once.

Regards

Seema

Hi,

Check the attached OML. Hope this make it easier to understand what I was trying to say.

Regards.