Has anyone tried to give the user the ability to paste data (separated by comma) in text box to produce a report?
We have an inspection tool that our underwriters use to setup inspections and it allows them to pull down data based on a County they select. Problem is, they may not want all the data for that county so they asked for a text box where they could paste in policy numbers allowing them to only inspect those polices entered. This used to work fine in 7.6.10 with the below code but WF8.1.0.5m does not like it. Anyone know a work around? I tried a -READ but it only list the first policy.
DEFINE FILE UW_PASTED_INDEXKEYS
INDEXKEY/A15=TRIM('T', INDEXKEY, 15, ' ', 1, 'A15');
END
TABLE FILE UW_PASTED_INDEXKEYS
SUM
INDEXKEY
BY INDEXKEY NOPRINT
ON TABLE HOLD AS PASTKEYS FORMAT ALPHA
END
TABLE FILE &USER_NH_TABLE
PRINT WF_INDEX
BY INDEXKEY
WHERE INDEXKEY CONTAINS (PASTKEYS);
ON TABLE HOLD AS UW_NH_POLICES_TO_INSPECT_LOAD FORMAT FOCUS INDEX WF_INDEX
END
Thanks JVThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8105m Windows, All Outputs
July 02, 2019, 01:18 PM
MartinY
I doubt that it work in 7.6.10 using a CONTAINS since CONTAINS is looking for a string patern that exist in a field, not a field that may be equal to several values.
Try this
DEFINE FILE UW_PASTED_INDEXKEYS
INDEXKEY/A15=TRIM('T', INDEXKEY, 15, ' ', 1, 'A15');
END
TABLE FILE UW_PASTED_INDEXKEYS
SUM INDEXKEY
BY INDEXKEY NOPRINT
ON TABLE HOLD AS PASTKEYS FORMAT ALPHA
END
-RUN
TABLE FILE &USER_NH_TABLE
PRINT WF_INDEX
BY INDEXKEY
WHERE INDEXKEY IN FILE PASTKEYS;
ON TABLE HOLD AS UW_NH_POLICES_TO_INSPECT_LOAD FORMAT FOCUS INDEX WF_INDEX
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
July 03, 2019, 03:12 PM
Jveselka
Thanks MartinY that work!
quote:
WHERE INDEXKEY IN FILE PASTKEYS;
WebFOCUS 8105m Windows, All Outputs
July 03, 2019, 03:44 PM
MartinY
My pleasure Edit your first post then add [SOLVED] at the beginning of the subject
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007