Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] @ Sign in BY TOTAL COMPUTE
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] @ Sign in BY TOTAL COMPUTE
 Login/Join
 
Gold member
posted
Hello,

I'm trying to do a simple table file and I am trying to accommodate for missing on a BY line by doing BY TOTAL COMPUTE = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD. When That happens, the table runs as expected, however the field name I originally tried to define displays as @2853_FIELD.

Does anyone know why this is happening and what I can do to fix it? Code example below:

 TABLE FILE _ADM_STAR
SUM 
    PAIDAMT
BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD'
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
END

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8204
 
Posts: 70 | Registered: July 10, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Brandon,
Can you repro using the CAR file?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Master
posted Hide Post
In looking at your compute named FIELD which is also referencing FIELD, I am assuming that you have another field named FIELD in the datasource? is that a defined field that you didn't include in the code?

 BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD' 


Also, are you trying to TOTAL an alpha field? I've never seen a COMPUTE in a BY field before.

I agree with Danny-SRL that in order for us to help you, we need you to reproduce the error with a file from the ibisamp folder, like the car file, so that we can run the code on our end.


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 485 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Gold member
posted Hide Post
I figured it out. Instead of By total, I just did By compute and that did what I wanted it to Smiler . Closing it


WebFOCUS 8204
 
Posts: 70 | Registered: July 10, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Hallway:
Also, are you trying to TOTAL an alpha field? I've never seen a COMPUTE in a BY field before.

This is a valid action to perform BY TOTAL COMPUTE …
A "BY TOTAL TOTAL" doesn't means that is sum the value. It means such as "perform once everything else is done".
In other words : once the WHERE SUM/PRINT and basic SORT (BY) are completed, create the new field FIELD based on the sentence next the equal sign.

quote:
Originally posted by Brandon Antrathy:
BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD IS MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD'

Try with
BY TOTAL COMPUTE FIELD/A100V MISSING ON = IF FIELD EQ MISSING THEN 'N/A' ELSE FIELD; AS 'FIELD'


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2223 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] @ Sign in BY TOTAL COMPUTE

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.