This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Apr 23, 2015, 1:07 PM
1 Posts

Select field values from a view and copy on a different form

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: End User
  • Tags:
  • Replies: 1

Hi to All, I don't have a lot of experience with LN. I have a MainForm  and a Response form with a numeric field "Amount". Of course each record in MainForm can have several Responses. Now, I would like to sum of all the "Amount" values for each topic and copy the result into a field "Result" in the MainForm.  In the MainForm I have  the subview "AllSPAss" with the column nr 5 linked to the field "Amount"

I tried with a button in the main form with the following code:

 

FIELD result:=result;

r:=@DbColumn("":""; ""; "AllSPAss"; 5 );

@SetField( "result"; @Sum( r ) )

 

It works, but it copies all the values it found  in the column 5 .. I have no idea how to select only the records related to single topic in the MainForm.

Thanks in advance for your help.

   

Apr 27, 2015, 8:56 AM
30 Posts
use @dblookup instead of @dbcolumn

Read the help - @dbcolumn returns ... a column 8-)

@dblookup("":"nocache":"";viewname;key;column)

Where 'key' defines the entries returned


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal