Focal Point
[CLOSED] Output format XML and count the no of lines

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7967092196

May 09, 2019, 04:26 PM
srajeevan
[CLOSED] Output format XML and count the no of lines
Hi,

I have a fex with output format in XML to serve an ESRI Map in HTML canvas.
Is there any was i can do the &LINES checking similar to i do in HOLD or HTML format.
For XML &LINES check is not working it seems.
But i can see a LINES tag in XML output.
Did anyone worked on branching in XML output fex?

This message has been edited. Last edited by: FP Mod Chuck,


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
May 09, 2019, 05:31 PM
Waz
I would suggest HOLD, check &LINES, then PCHOLD FORMAT XML


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

May 09, 2019, 05:50 PM
srajeevan
That fex with output format XML serves the ESRI map.
For some reason if i try to HOLD and then do other stuff ,Map is not refreshing after initial load.

I tried earlier the below scenario:
HOLD AS HLD1
Then checked &LINE conditon
-label
print HLD1 as XML

But map is not refreshing after initial load.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
May 09, 2019, 06:00 PM
Waz
Can you post the code ?

Should be simple as:

TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD AS CHECK
END
-RUN
-IF &LINES EQ 0 THEN GOTO ::Zero:Recs;
TABLE FILE CAR or CHECK if it has all the columns
PRINT COUNTRY
ON TABLE PCHOLD FORMAT XML
END

-RUN

-GOTO ::End

-::Zero:Recs

-* Zero Recs Handler
.
.
.

-::End



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

May 10, 2019, 11:58 AM
srajeevan
Hi Waz,

I a doing similar to what you have shown.
But the problem is map layer is not refreshing after initial load if i do branching like this.
If i am not branching and have the only main fex,it will refresh.

Here is the code i use.I changed filed names/table names.
 
TABLE FILE FACT_DEMO_TABLE

PRINT
     COMPUTE LATITUDE_LONGITUDE_POINT/A150 = GIS_POINT('4326', FACT_DEMO_TABLE.LONGITUDE, FACT_DEMO_TABLE.LATITUDE);
FACT_DEMO_TABLE.TYPE_DESCR
FACT_DEMO_TABLE.EVENT_NUM
FACT_DEMO_TABLE.LATITUDE
FACT_DEMO_TABLE.LONGITUDE

WHERE
( FACT_DEMO_TABLE.START_DATETIME GE '&START_DATE 00:00:00' )
AND ( FACT_DEMO_TABLE.START_DATETIME LE '&END_DATE 23:59:59')
AND FACT_DEMO_TABLE.DISTRICT_ID EQ &DISTRICT_ID
AND FACT_DEMO_TABLE.COUNTY_ID EQ &COUNTY_ID
AND FACT_DEMO_TABLE.CITY_ID EQ &CITY_ID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDMAPPTS FORMAT FOCUS
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
END

-IF &LINES EQ 0 GOTO :DONE;
TABLE FILE HOLDMICRPTS
PRINT
*
ON TABLE PCHOLD FORMAT XML
END

-EXIT

-:DONE
TABLE FILE FACT_DEMO_TABLE
PRINT
     COMPUTE LATITUDE_LONGITUDE_POINT/A150 = GIS_POINT('4326', FACT_DEMO_TABLE.LONGITUDE, FACT_DEMO_TABLE.LATITUDE);

COMPUTE TYPE_DESCR/A40V ='DUMMY VALUE';
COMPUTE EVENT_NUM/A40V ='DUMMY VALUE';
COMPUTE LATITUDE/A40V = '0';
COMPUTE LONGITUDE/A40V = '0';

 WHERE RECORDLIMIT EQ 1
 WHERE READLIMIT EQ 1
ON TABLE PCHOLD FORMAT XML
END
-EXIT
 



WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
May 11, 2019, 02:31 PM
dbeagan
It seems like you would want a

-RUN

prior to your

-IF &LINES EQ 0 GOTO :DONE;



WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
May 15, 2019, 04:51 PM
srajeevan
Added -RUN but stll the map layer wont refresh after first run.Looks like the map will only accept fields in a particular way.If i branch or do some processing out side of the main fex and pass the fields then map layer is not refreshing.

I will be happy if the map layer gets created even though the initial load gives zero output so that i don't have to do any pre/post processing of map fields.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
May 15, 2019, 05:32 PM
Waz
I would suggest using your browsers developer tools to look at the response from the call to see what is happening, perhaps compare to a successful one


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

May 21, 2019, 02:41 PM
srajeevan
okay.
"I think map engine hates seeing Dialog mgr commands & branching and chokes".

&LINES is the amper variable to check no of records/lines regardless of output format.?
Or is there any equivalent for XML output format.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL