Solved

how to pass a data from a list view control into a sql procedure in k2 five

  • 10 May 2023
  • 4 replies
  • 48 views

Badge +3

Hi,

i have a list view (List view A) which i input a data into on a form and i also have another list view (List view B) which just contain data…

List view A consist of item, Quantity, Budget etc WHILE List view B consist of Budget, Balance, Request etc

i am getting the budget in the List view A from List view B, doing a get list.

i have a procedure which i pass in the value on the list view A  to do a deduction or addition, if the budget value from list view B is 3 which i get into budget of list view A and i input 2 into my quantity control

the procedure ought to deduct the quantity value from the budget in list view B but it does not.

my thought was may be the procedure is not picking the value on the list cause when i use SMO test to test the procedure works fine.

 

Kindly help with a solution on this.

thanks in advance.

icon

Best answer by Etunz 16 May 2023, 09:57

View original

4 replies

Userlevel 3
Badge +10

If it is a list view, is the list view bound to a SMO/Datasource?

Usually for list view, you would need to have the item in the list selected (via left click for example); then invoke an action via button clicked, etc.  If you use the Smo/Data Source field for the list view in the desired action mappings (instead of the Display Row(s) fields), then it should be the selected list item’s value that get passed along.

You can use a show a message action and output the fields before you execute your SQL action to see if the field/control has the correct value as a debugging step.

 

 

Badge +3

Thanks Tintex, though i was able to achieve it in another way, this also enhance my thinking.

Userlevel 5
Badge +20

Hi @Etunz 
Please share your solution with us! 

Badge +3

i make use of a rule that says “for all item on a list control’ the i excute the procedure that i have convert to smartobject then pass in the list view control data into the procedure”.

Reply