Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Dynamic Parameter Loading

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved]Dynamic Parameter Loading
 Login/Join
 
Silver Member
posted
Hai
We need Year,Month and the corresponing days for that month (example For Jan 1,2,3...31 and For Feb 1,2,3..28or29) as a parameter
For these we have cratead the following Procedure

FILEDEF DATEMAS DISK DATERNG.MAS
-RUN
-WRITE DATEMAS FILE=DATERNG,SUFFIX=XFOC
-WRITE DATEMAS SEGNAME=SEG1
-WRITE DATEMAS FIELD=DATE_KEY, ,DMYY ,DMYY , $
-RUN
CREATE FILE DATERNG
MODIFY FILE DATERNG
FREEFORM DATE_KEY.A8.
LOG FORMAT MSG OFF
LOG TRANS MSG OFF
LOG INVALID MSG OFF
DATA
-* Any invalid dates will be rejected.
-PROMPT &Year.(2000,2001,2002,2003,2004,2005,2006,2007,2008);
-PROMPT &Month.(1,2,3,4,5,6,7,8,9,10,11,12);
-DEFAULT &Year = '2000';
-DEFAULT &Month = '2';
-SET &Day = 1;
-REPEAT :Loop1 31 TIMES;
-SET &Date = IF &Day LT 10 THEN '0' || &Day ELSE &Day;
-SET &Mnth = IF &Month LT 10 THEN '0' || &Month ELSE &Month;
&Date&Mnth&Year
-SET &Day = &Day + 1;
-:Loop1
END
-RUN
DEFINE FILE DATERNG
DAY/D = DATE_KEY
END
TABLE FILE DATERNG
SUM FST.DAY
BY DAY
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLCSS ON
END

When we Call this Procedure for loading dropdown box in HTML layout Painter We did not get any Output and also How can we Pass these parameters to our main prodcedure

Please Help us in this issues

Thanks

This message has been edited. Last edited by: Surenther,


----------------------------------
Prod Version:WebFocus 8.1.05,OS:Unix ,Output:ALL
 
Posts: 29 | Location: North Carolina | Registered: August 26, 2008Report This Post
<JG>
posted
Why do you not just use the calendar functionality in the HTML painter?

If the associated variable is part of your form it will be passed automatically.
 
Report This Post
Expert
posted Hide Post
Surenther,

Nice to know that code I've posted is being used! Do you understand what it is actually doing?

I agree with JG, why not use the calendar within painter?

Oh, and as a pointer, you will not be able to use -PROMPT within a fex used to populate a dropdown.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
Yes Tony we take Your Code Only

We used the calender control its worked fine But our requirements is dropdown box

Is there anyother way to acheive this?

Thanks For spending your valuable time

This message has been edited. Last edited by: Surenther,


----------------------------------
Prod Version:WebFocus 8.1.05,OS:Unix ,Output:ALL
 
Posts: 29 | Location: North Carolina | Registered: August 26, 2008Report This Post
Expert
posted Hide Post
Surenther,

There are probably many ways of achieving a populated dropdown, but it all depends on what your actual requirement is. I would suggest giving it some thought and working out what you actually need to do.

As I have said before (not to you but in other posts) think laterally about a problem and often you will find a way to achieve what you need.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
Hai We done it by using the following codes.We Created 3 procedures for year,month and date

For year

FILEDEF DATEMAS DISK DATERNG.MAS
-RUN
-WRITE DATEMAS FILE=DATERNG,SUFFIX=XFOC
-WRITE DATEMAS SEGNAME=SEG1
-WRITE DATEMAS FIELD=DATE_YEAR, ,I4,I4,$
-WRITE DATEMAS FIELD=DATE_MON, ,I2,I2,$
-WRITE DATEMAS FIELD=DATE_KEY, ,A8 ,A8 , $
-RUN
CREATE FILE DATERNG
MODIFY FILE DATERNG
FREEFORM DATE_YEAR.I4. DATE_MON.I2. DATE_KEY.A8.
DATA
-DEFAULT &Year = 1989;
-REPEAT :Loop2 2 TIMES;
-SET &Month = 1;
-REPEAT :Loop1 12 TIMES;
-SET &Day = 1;
-SET &CNT=IF (DMOD(&Year,4,I2)EQ 0 ) AND (&Month EQ 2) THEN '29' ELSE IF (&Month EQ 2) THEN '28' ELSE IF &Month EQ '1' OR '3' OR '5' OR '7' OR '8' OR '10' OR '12' THEN '31' ELSE '30';
-REPEAT :Loop3 &CNT TIMES;
&Year
&Month
-SET &Date = IF &Day LT 10 THEN '0' || &Day ELSE &Day;
-SET &Mnth = IF &Month LT 10 THEN '0' || &Month ELSE &Month;
&Date
-SET &Day = &Day + 1;
-:Loop3
-SET &Month = &Month + 1;
-:Loop1
-SET &Year = &Year + 1;
-:Loop2
END
-RUN

TABLE FILE DATERNG
PRINT DST.DATE_YEAR
BY DATE_YEAR
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT XML
END

For Month

We modified the last report like this

TABLE FILE DATERNG
PRINT DST.DATE_MON
BY DATE_YEAR
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT XML
END

For Date

TABLE FILE DATERNG
PRINT DST.DATE_KEY
BY DATE_YEAR
BY DATE_MON
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT XML
END


Then we load these Procedure to 3 dropdown boxes in HTML and we use the chained function for the relationship

Tony Thanks for your Code we used your Code as a model


----------------------------------
Prod Version:WebFocus 8.1.05,OS:Unix ,Output:ALL
 
Posts: 29 | Location: North Carolina | Registered: August 26, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Dynamic Parameter Loading

Copyright © 1996-2020 Information Builders