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.
I have a report that requires the users to input some values into a text box. I am not using the html layout painter, so I would like the text box to be within the fex. Is this possible?This message has been edited. Last edited by: Kerry,
There are only afew things that you can't do with WebFOCUS. This is not one of them, so yes it can be done. There are basicly two ways: the first means that you code your variables with a list of choices and let the autoprompt facility handle the rest. The second is that you code the html code in your fex, and run it; this means you;ll need a second fex to receieve the selected values. I'm sure there are a lot of examples to be found, either within this forum, or on the IB tech support site.
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I have a field called forecast which has values and I need a text box for the users to input suggested forecast sales: 100 200 300 500 800 900 forecast: 100 200 300 400 500 600 sug fct: ___ ___ ___ ___ ___ ___
You would add a field to the define in front of the INFLD to convert the field to alpha and specifiy a format that omits leading zeros. Then use that alpha field in the INFLD definition without the EDIT command.
There is some residual effects from the FTOA that you need to deal with. The FTOA function leaves leading blanks in the value. If you look at the source code of the report results you will see all the spaces.
Here is some code that eliminates the blanks and adds the right justification for the INPUT box. My original suggestion for adding align=right was incorrect.
DEFINE FILE CAR ALPHA_FCT/A30 = FTOA(RETAIL_COST, '(D20)', ALPHA_FCT); LEFTJ_FCT/A30 = LJUST(30,ALPHA_FCT,'A30'); INFLD/A255='<INPUT type="text" value="' || (LEFTJ_FCT || '" name="SALESTEXT" style="text-align:right">'); END TABLE FILE CAR PRINT CAR INFLD END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
I know I'm jumping in a little late, but this concept intrigued me and I decided to see if I could bring this a step further and make things update dynamically within the report according to user input using some simple javascript. Here is what I came up with. I don't know if it is useful for anyone but, I found it interesting.
Eric
DEFINE FILE CAR
RETAIL/A16=FTOA(RETAIL_COST,'(D12CM)',RETAIL);
END
TABLE FILE CAR
PRINT
-* INFLD
COMPUTE CNT/I4=CNT+1;
COMPUTE RETAIL_COST/A255=RETAIL | '<INPUT type=hidden id=cost' | EDIT(CNT) | ' value=' | EDIT(RETAIL_COST) | '>';
COMPUTE REBATE/A255='<INPUT id=rebate' | EDIT(CNT) | ' value="" onChange=projectFuture("' | EDIT(CNT) | '")>'; AS 'Rebate %'
COMPUTE MULT_INFLD/A255='<span id=infld' | EDIT(CNT) | '>calculation</span>';
BY CAR
END
-HTMLFORM BEGIN
<HTML>
<head>
<SCRIPT>
function projectFuture(num)
{
var costName='cost' + num;
var rebateName='rebate' + num;
var newCost=document.getElementById(costName).value * ((100 - document.getElementById(rebateName).value) / 100);
var idName='infld' + num;
document.getElementById(idName).firstChild.nodeValue=newCost;
}
</SCRIPT>
</HEAD>
-HTMLFORM END
Eric Woerle WF 7.6.7 Reportting Server ETL 7.6.10 Dev Studio 7.6.7
WOW,this is interesting... The users acually want 12 text boxes where they can input a 12 month forecast and then start changing some numbers to see what that does to the total..After going to summit this year I thought I was ready for anything but this had me stuck until now.
I need to save those values in the text box and send to someone for review. When I save the cars report with the javascript logic for calculations it opens with a blank text box instead of the value that was put into the text box.
Thanks for responding, I was starting to get worried that nobody could help with this one. I am not trying to save the values to a database,the users will be in a hotel plugging in values and then saving it to their local drive for later review. When they open the saved report they need to still see the values they put into the text box.
If they want to save it to their local computers, why not just dump it into excel? you could always create a blank field and write your formula into the compute so that they don't need to worry about it. But if they want to be able to save and work with it locally, that would be the way I would go.
Eric Woerle WF 7.6.7 Reportting Server ETL 7.6.10 Dev Studio 7.6.7