Looping through a refcursor to get list of dates as a string
hi,
i have a simple procedure which gives me list of from dates and to dates
i need to get the dates a comma separated dates
i am not sure if this can be done directly by doing a for loop on the refcursor or i have to fetch it into a record/array and then concatenate with comma or is there anything else that can be done.
i tried out some stuff like below
ps help me out
the procedure that retruns the list of dates is
CREATE OR REPLACE procedure SALUSER.prm_sp_rpt_payslip_lop_dates(p_empid in int,p_tran_year in int,p_tran_month in integer,o_dates out sys_refcursor)
as
begin
open o_dates for select to_char(PHL_LOP_FROM,'DD-Mon-YYYY'),to_char(PHL_LOP_TO,'DD-Mon-yyyy')
from prm_h_lop
where phl_emp_id=p_empid
and phl_tran_year=p_tran_year
and phl_Tran_month=p_tran_month;
end;
/i need my o/p as
dates :<date1>,<date2>...etcregards,
Maybe sth. like
SQL> var cur refcursor
SQL> declare
cr sys_refcursor;
procedure prm_sp_rpt_payslip_lop_dates (cr in out sys_refcursor)
as
begin
open cr for select hiredate from emp;
end prm_sp_rpt_payslip_lop_dates;
begin
prm_sp_rpt_payslip_lop_dates(cr);
open :cur for select 'Dates: ' || column_value dates from xmltable('string-join(//text(), ", ")' passing xmltype(cr));
end;
PL/SQL procedure successfully completed.
SQL> print cur
DATES
Dates: 17-Dec-1980, 20-Feb-1981, 22-Feb-1981, 02-Apr-1981, 28-Sep-1981, 01-May-1
981, 09-Jun-1981, 19-Apr-1987, 17-Nov-1981, 08-Sep-1981, 23-May-1987, 03-Dec-198
1, 03-Dec-1981, 23-Jan-1982
1 row selected.
Similar Messages
-
Looping through an array to get the index for each measure in a combo box
Hi folks,
I am working on a web application that has two combo boxes, one for year (called yearcombo) and for measures (called myURL) for that selected year, and also two radiobuttons (in radioBtnGroup). I have two years and a bunch of measure for each year. I have a map tool tip that when you mouse over the county you see a measure for that specific year. However I have a bunch of measures for each year and I want to be able to loop through the measures (which are in an array collection inside a combobox) so my "if" expression can find every selectedIndex and bring me the tool tip for that selected measure for that selected radio button. Right now I would have to create if statements for each measure (each selectedIndex inside the myURL combobox)and each radiobutton (inside the radioBtnGroup) instead of creating a if expression to get a map tip tool for each measure. I know I would have to create a loop to search for these indexes and enter that in the if expression and also change the graphic.attributes to reflect the right measure or index selected. Do you API for Flex wizards can give me any tips on how to code this according to my code below ? Any help is greatly appreciated! (the print scree is attached)
Below is the code snippet:
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
And below is the combo boxes with the arrays
<mx:FormItem label="Year :" >
<mx:ComboBox id="yearcombo" selectedIndex="0" labelField="label" width="100%" change="changeEvt(event)" >
<mx:ArrayCollection id="year" >
<fx:Object label="2007" year="2007" />
<fx:Object label="2009" year="2009" />
</mx:ArrayCollection>
</mx:ComboBox>
</mx:FormItem>
<mx:FormItem label="Measure:">
<mx:ComboBox id="myURL" selectedIndex="8" width="80%" mouseOver="clickEv2(event)" close="closeHandler(event)">
<mx:ArrayCollection id="measures" >
<fx:Object id="forindout07" labeltext="2007 Forestry Industry Output" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_07_forest_industry_output" year="2007" />
<fx:Object id="foremp07" label="2007 Forestry Employment " value="RADIO_BUTTONS/TFEI_07_forest_employment" year="2007" />
<fx:Object id="forlabinc07" label="2007 Forestry Labor Income " value="RADIO_BUTTONS/TFEI_07_forest_labincome" year="2007" />
<fx:Object id="forindbustax07" label="2007 Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_07_forest_business_tax" year="2007" />
<fx:Object id="forindout09" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_09_forest_industry_output" year="2009" />
<fx:Object id="foremp09" label="2009 Forestry Employment " value="RADIO_BUTTONS/TFEI_09_forest_employment" year="2009" />
<fx:Object id="forlabinc09" label="2009 Forestry Labor Income " value="RADIO_BUTTONS/TFEI_09_forest_labincome" year="2009" />
<fx:Object id="forindbustax09" label="2009 Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_09_forest_business_tax" year="2009" />
<fx:Object id="blank" label=" " />
</mx:ArrayCollection>And here is the entire code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
paddingBottom="8" paddingLeft="8"
paddingRight="8" paddingTop="8"
backgroundColor="0xffffff"
layout="vertical" >
<!-- Start Declarations -->
<fx:Declarations>
<esri:SimpleFillSymbol id="mouseOverSymbol" alpha="0.5" color="0x808080">
<esri:SimpleLineSymbol width="0" color="#000000"/>
</esri:SimpleFillSymbol>
<esri:SimpleFillSymbol id="defaultsym" alpha="0.01" color="#E0E0E0" >
<esri:SimpleLineSymbol width="1" color="#000000"/>
</esri:SimpleFillSymbol>
<!-- End Declarations -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.esri.ags.Graphic;
import com.esri.ags.SpatialReference;
import com.esri.ags.esri_internal;
import com.esri.ags.events.GraphicEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.layers.ArcGISDynamicMapServiceLayer;
import com.esri.ags.symbols.SimpleFillSymbol;
import com.esri.ags.symbols.SimpleLineSymbol;
import flash.utils.flash_proxy;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.RadioButton;
import mx.controls.TextArea;
import mx.events.DropdownEvent;
import mx.events.ItemClickEvent;
import mx.rpc.Fault;
import mx.rpc.events.FaultEvent;
import flash.display.Sprite;
import flash.events.ErrorEvent;
import flash.events.MouseEvent;
private function closeHandler(evt:DropdownEvent):void {
myLabel.text = ComboBox(evt.target).selectedItem.labeltext;
private function loadLayerName():void
myLegend.layers = null;
layerPanel.removeAllChildren();
//loop through each layer and add as a radiobutton
for(var i:uint = 0; i < (dynamicLayer.layerInfos.length); i++)
var radioBtn:RadioButton = new RadioButton;
radioBtn.groupName = "radioBtnGroup";
radioBtn.value = i;
radioBtn.label = dynamicLayer.layerInfos[i].name;
if (dynamicLayer.layerInfos[i].name == "Direct Impact (Million $)")
radioBtn.label = "Direct Impact";
else if (dynamicLayer.layerInfos[i].name == "Total Impact (Million $)")
{radioBtn.label = "Total Impact";
else if (dynamicLayer.layerInfos[i].name == "Total Impact (Jobs)")
{radioBtn.label = "Total Impact";
else if (dynamicLayer.layerInfos[i].name == "Direct Impact (Jobs)")
{radioBtn.label = "Direct Impact";
else
{radioBtn.visible= false;
layerPanel.addChild(radioBtn);
/* myDividerBox.getDividerAt(0).visible = false; */
//set the visible layer the first radio button
radioBtnGroup.selectedValue = 0;
dynamicLayer.visibleLayers = new ArrayCollection([0]);
myLegend.layers = [dynamicLayer];
myLegend.visible = true;
private function radioClickHandler(event:ItemClickEvent):void
myLegend.layers = null;
// update the visible layers to only show the layer selected
dynamicLayer.visibleLayers = new ArrayCollection([event.index]);
myLegend.layers = [dynamicLayer];
private function changeEvt(event:Event):void {
if (yearcombo.selectedItem.year == "2007")
measures.filterFunction=filter1
measures.refresh()
myURL.dataProvider=measures
else if (yearcombo.selectedItem.year == "2009")
measures.filterFunction=filter2
measures.refresh();
public function filter1(item:Object):Boolean
if (item.year=="2007") return true
else return false
public function filter2(item:Object):Boolean
if (item.year=="2009") return true
else return false
private function clickEvt(event:Event):void {
if (yearcombo.selectedItem.year == "2007")
measures.filterFunction=filter3
measures.refresh()
myURL.dataProvider=measures
else if (yearcombo.selectedItem.year == "2009")
measures.filterFunction=filter4
measures.refresh();
public function filter3(item:Object):Boolean
if (item.year=="2007") return true
else return false
public function filter4(item:Object):Boolean
if (item.year=="2009") return true
else return false
private function clickEv2(event:Event):void {
if (yearcombo.selectedItem.year == "2007")
measures.filterFunction=filter5
measures.refresh()
else if (yearcombo.selectedItem.year == "2009")
measures.filterFunction=filter6
measures.refresh();
else if (yearcombo.selectedItem.year == 2007 && myURL.selectedIndex==8)
myLegend.layers = null;
layerPanel.removeAllChildren();
public function filter5(item:Object):Boolean
if (item.year=="2007") return true
else return false
public function filter6(item:Object):Boolean
if (item.year=="2009") return true
else return false
/* IF YOU WANT TO INCLUDE OTHER VALUES IN THE MAP TOOLTIP LIKE COUNTY NAME AND THE LABEL OF THE SELECTED ITEM
if (myURL.selectedIndex==0)
myTextArea.htmlText = "<b>County: </b>" + gr.attributes.NAME + "\n"
+ "<b>Measure: </b>" + myURL.selectedItem.label + gr.attributes.ForDirIndOut.toString()
public function fLayer_graphicAddHandler(event:GraphicEvent):void
event.graphic.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);
event.graphic.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutHandler);
public function onMouseOverHandler(event:MouseEvent):void
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpIndOut.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirEmp.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpEmp.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirLabInc.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpLabInc.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2007" && myURL.selectedIndex == 3 )
fLayer.definitionExpression = "DATA_YEAR_TXT like '2007'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForIndirBusTax.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirIndOut.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 0 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpIndOut.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirEmp.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 1 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpEmp.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 0)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForDirLabInc.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 2 && radioBtnGroup.selectedValue == 1)
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForTotImpLabInc.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
if (yearcombo.selectedItem.year == "2009" && myURL.selectedIndex == 3 )
fLayer.definitionExpression = "DATA_YEAR_TXT like '2009'"
var graphic:Graphic = Graphic(event.currentTarget);
graphic.symbol = mouseOverSymbol;
var htmlText:String = graphic.attributes.htmlText;
var textArea:TextArea = new TextArea();
try{
textArea.htmlText = myURL.selectedItem.label + graphic.attributes.ForIndirBusTax.toString()
myMap.infoWindow.content=textArea
myMap.infoWindow.label = graphic.attributes.NAME;
myMap.infoWindow.closeButtonVisible = false;
myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));}
catch(error:Error) {
trace("Caught Error: "+error);
public function onMouseOutHandler(event:MouseEvent):void
var gr:Graphic = Graphic(event.target);
gr.symbol = defaultsym;
myMap.infoWindow.hide();
]]>
</fx:Script>
<fx:Style>
@namespace esri "http://www.esri.com/2008/ags";
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace esri "http://www.esri.com/2008/ags";
@namespace components "com.esri.ags.components.*";
components|InfoWindow
content-background-alpha : 0.4;
background-color : #4A7138;
background-alpha : 0.7;
border-style : solid;
</fx:Style>
<mx:HBox width="930" height="800" id="mapHbox" horizontalAlign="center" >
<mx:HBox width="80">
</mx:HBox>
<mx:HBox id="myHBox" width="800" height="600" backgroundColor="0xffffff" >
<mx:VBox height="590" width="358" >
<!-- <mx:Panel
width="356" height="100%"
color="0x000000"
borderAlpha="0.15"
>
-->
<mx:Canvas height="100%" width="100%" backgroundColor="0xffffff" >
<esri:Map id="myMap" openHandCursorVisible="false"
height="100%"
logoVisible="false"
doubleClickZoomEnabled="false"
scrollWheelZoomEnabled="false"
zoomSliderVisible="false"
scaleBarVisible="false" scale="4000000" >
<esri:extent>
<esri:Extent xmin="-10736651.061900" ymin="4024099.909700" xmax="-10409195.669800" ymax="3440153.831100" >
<esri:SpatialReference wkid="102100"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISDynamicMapServiceLayer id="dynamicLayer2"
url="http://tfs-24279/ArcGIS/rest/services/RADIO_BUTTONS/counties_layer/MapServer" />
<esri:ArcGISDynamicMapServiceLayer id="dynamicLayer" name=" "
alpha="1"
load="loadLayerName()"
url="http://tfs-24279/ArcGIS/rest/services/{myURL.selectedItem.value}/MapServer" />
<esri:FeatureLayer id="fLayer"
graphicAdd="fLayer_graphicAddHandler(event)"
mode="snapshot"
outFields="*"
symbol="{defaultsym}"
url= "http://tfs-24279/ArcGIS/rest/services/RADIO_BUTTONS/feature_layer_0709_five/FeatureServer/ 0" />
</esri:Map>
</mx:Canvas>
<!-- </mx:Panel>-->
</mx:VBox>
<mx:VBox height="590" width="20" >
</mx:VBox>
<mx:Canvas height="500" width="400" backgroundColor="0xffffff"
horizontalScrollPolicy="off"
verticalScrollPolicy="off" >
<mx:VBox width="420" height="50%" paddingLeft="5" paddingTop="10" paddingRight="10" paddingBottom="10"
verticalGap="8">
<mx:Form >
<mx:FormItem label="Year :" >
<mx:ComboBox id="yearcombo" selectedIndex="0" labelField="label" width="100%" change="changeEvt(event)" >
<mx:ArrayCollection id="year" >
<fx:Object label="2007" year="2007" />
<fx:Object label="2009" year="2009" />
</mx:ArrayCollection>
</mx:ComboBox>
</mx:FormItem>
<mx:FormItem label="Measure:">
<mx:ComboBox id="myURL" selectedIndex="8" width="80%" mouseOver="clickEv2(event)" close="closeHandler(event)">
<mx:ArrayCollection id="measures" >
<fx:Object id="forindout07" labeltext="Forestry Industry Output" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_07_forest_industry_output" year="2007" />
<fx:Object id="foremp07" label="Forestry Employment " value="RADIO_BUTTONS/TFEI_07_forest_employment" year="2007" />
<fx:Object id="forlabinc07" label="Forestry Labor Income " value="RADIO_BUTTONS/TFEI_07_forest_labincome" year="2007" />
<fx:Object id="forindbustax07" label="Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_07_forest_business_tax" year="2007" />
<fx:Object id="forindout09" label="Forestry Industry Output " value="RADIO_BUTTONS/TFEI_09_forest_industry_output" year="2009" />
<fx:Object id="foremp09" label="Forestry Employment " value="RADIO_BUTTONS/TFEI_09_forest_employment" year="2009" />
<fx:Object id="forlabinc09" label="Forestry Labor Income " value="RADIO_BUTTONS/TFEI_09_forest_labincome" year="2009" />
<fx:Object id="forindbustax09" label="Forestry Indirect Business Tax" value="RADIO_BUTTONS/TFEI_09_forest_business_tax" year="2009" />
<fx:Object id="blank" label=" " />
</mx:ArrayCollection>
</mx:ComboBox>
</mx:FormItem>
</mx:Form>
<mx:VBox id="layerPanel" width="50%" height="8%" verticalGap="3" paddingLeft="17">
<mx:RadioButtonGroup id="radioBtnGroup" itemClick="radioClickHandler(event)" />
</mx:VBox>
<mx:VBox paddingLeft="17" height="50%" >
<mx:Canvas id="legendPanel" width="100%" >
<mx:Label id="myLabel" text=" " fontWeight="bold" />
<esri:Legend id="myLegend"
layers="{[dynamicLayer]}"
map="{myMap}" visible="false"
respectCurrentMapScale="false"/>
</mx:Canvas>
<mx:TextArea width="275" borderAlpha="0" height="200" >
<mx:htmlText >
<![CDATA[<font size='11'><b>Note:</b> Counties in white indicate either no data is available for that measure or the data has been supressed due to confidentiality.</font>
]]>
</mx:htmlText>
</mx:TextArea>
</mx:VBox>
</mx:VBox>
</mx:Canvas>
</mx:HBox>
</mx:HBox>
</mx:Application> -
Loop through a model to get variables and values
I use an AS model (named AppGlobals.as) to store the application variables. I need to replace the hard-coded values of the elements to ones pulled from a database. As such, I need to iterate through the model to find all the elements that match my query results and then set the value of the elements to those returned from the database query.
My current issue is that I have no clue how to iterate through the model to get the elements so that I can use them a parameters for my query. An example of AppGlobals.as follows...
package com.models
[Bindable]
public class AppGlobal
public var appAnnualMaintenanceAlert:String="The System is unavailable due to routine annual maintenance! Please check back after 2:00 PM Eastern on January 1, 2012!";
public var appAnnualMaintenanceStart:Date=new Date(2012, 11, 31, 18, 0, 0, 0);
public var appAnnualMaintenanceEnd:Date=new Date(2013, 0, 1, 14, 0, 0, 0);
public var appYearPrevious:String="2011";
public var appYear:String="2012";
public var appYearNext:String="2013";
public var dttm_landing_expected:String="1/1/2012 12:00:00 AM";
How can I iterate through the model to find all the var names and then match them with my query to return the corresponding values? Any help is appreciated.
Thanks!
LeeHi,
"elided" and "hidden" both have UI purpose (make the UI lighter) but are quite different:
"elided" is a static attribute of property groups (readonly, and After Effects never changes the value internally).
The children of an elided group are not necessarily elided.
"hidden" is NOT an attribute, is dynamic, and "undocumented".
The After Effects UI hides everything that is not needed in the layer property tree (for instance the material option group is hidden when the layer is not 3D, since it is not used anyway).
Hidden groups and properties are still there though and can be accessed by script, one can read their values and attributes, scout their property subtree, but one cannot set anything on them nor select them (in both cases an error is generated).
And the children of a hidden group are hidden.
Since there is no attribute corresponding to "hidden", it is uneasy to know whether a property is hidden or not. I can only see a case by case "treatment".
For instance:
is myLayer.layerStyle hidden ? <===> !myLayer.layerStyle.canSetEnabled
is myLayer.transform.xRotation hidden ? <===> !myLayer.transform.xRotation.canSetExpression
is myLayer.mask hidden ? <===> myLayer.mask.numProperties===0
is myShapeLayer.content hidden ? <===> false (never hidden, even if empty)
etc...
Xavier. -
Loop through values in rows to find faulty data
Hi all,
We have a column which is supposed to have values in increasing order.(If it doesn't comply with this rule, we want to discard the row). How do I loop through rows for a particular column, in SQL or PL.SQL?
Thanks.user12295995 wrote:
If it doesn't comply with this rule, we want to discard the rowNot sure what you mean. It looks like you want to get rid of duplicates. If so, use:
DELETE tbl WHERE ROWID NOT IN (SELECTMIN(ROWID) FROM tbl GROUP BY col)
/If you want to identify gaps, use:
with t as (
select 1 id from dual union all
select 2 id from dual union all
select 3 id from dual union all
select 4 id from dual union all
select 5 id from dual union all
select 11 id from dual union all
select 12 id from dual union all
select 13 id from dual union all
select 21 id from dual union all
select 22 id from dual union all
select 23 id from dual
select '[' || (prev_id + 1) || ' - ' || (id - 1) || ']' gap
from (
select id,
lag(id) over(order by id) prev_id
from t
where id > prev_id + 1
order by id
GAP
[6 - 10]
[14 - 20]
SQL> SY. -
How to get list of dates between from date to till date?
for example:
from date= 20071001(yyyy-mm-dd)
till date =20071102(yyyy-mm-dd)
i need to printout the date betwwen these two dates inclusive.?
please suggest me to do this.....Use Data and Calendar objects, read the API - there is a method for adding values to a specified field of the date - what you need to do is simply loop and add one day to the start date and check wheather you've reached the end date.
In the loop you can add the newly created date objects to a list or print them out directly.
HTH -
Looping through json object in a query string
Hi
I have a json object in my query string and would like to loop through it, do i convert it to an array, or a map, so that i can loop through it?
I get the object from the url which looks like this:
{"CREATEDBYNAME":"TEST_ADMIN","FIRSTNAME":"John","TYPEID":"1900000000"}
I would then like to loop through it so that i can make a string that would look like:
"CREATEDBYNAME" = "TEST_ADMIN" AND "FIRSTNAME" = "John" AND "TYPEID"="1900000000"
I want to use a loop because there can be up to 15 options in the json object. and the if statement would just not do.
Plz help.What you can do with that object, I can't tell you because I don't know what it can or can't do. What's its API? Where does it come from?
-
How to loop through a directory?
Hi,
I have a folder structure like the one below:
MainFolder > Folder1
> Folder2
> Folder10
Each folder have multiple subfolders and files
I'm looking for a way to recursively loop through each folder and get its location path
I have looked through other examples but none have worked for me
Any ideas?
Thanks!Thanks! I've been trying to do that for ages! I only started using Powershell so I'm a complete noob lol!
Is there anyway to loop through and put each directory path into a variable ?
There is, but that's a completely different question, and you should start a new thread for that.
And, while it's possible it's not really a good idea and there are much better alternatives.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " " -
Loop through table(table is created dynamically)
Hi all,
I have a table that is created dynamically.It has got 3 columns and 8 rows.In first row - first column,I have a value that is set dynamically.Now, How can I loop through this table and get this value?
The table context node and value attributes are also created dynamically.
Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value
TimesheetData
col1.Value
col2.Value
col3.Value
Again.... this node and attributes are not there in my view context by default, its getting created and binded dynamically here.
Thanks KukkuHi,
Following is the code to iterate through the elements
//Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value
for(int x=0;x<wdContext.getChildNode("TimesheetData",0).size(); x++)
IWDNodeElement nodeElement = wdContext.nodeTimesheetData().getElementAt(x);
String value1 = (String) nodeElement.getAttributeValue("col1");
String value2 = (String) nodeElement.getAttributeValue("col2");
String value3 = (String) nodeElement.getAttributeValue("col3");
Regards
Ayyapparaj -
Need to loop through Recursive node
Hi Everyone,
I am having troubles looping through a node to get a boolean value called "Check".
Basically I am using the TreeNesteedInTable UI. One of the columns I display is the "Check" mentioned above. Basically the user can go through the tree structure and check his/her options. I should then be able to loop through this structure to get all the records "Checked". My application is not doing this.
At the moment I am looping through the top level node - think this is where my probelm is because this node can only be singleton! This means that I then have to loop through the Recusrsive node of this type to get the values as the recusrive is always non-singleton en must therefor contain the elements I am looking for. But, i do not know how tho get access to this node. Is this the correct way of doing it, or how should it be done otherwise?
Many thanks,
ChristiaanHI,
I got it to work like this:
public void addICAMForIncident( ) {
//@@begin addICAMForIncident()
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
try {
int count;
Bapi1240_Rc rootCause;
IPublicEhs_icam.IAbsentOrFailedControlsElement existingAbsentOrFailedControlsElement;
IPublicEhs_icam.IAbsentOrFailedControlsElement recursive;
IPublicEhs_icam.IAbsentOrFailedControlsElement recursiveChildElement;
IPublicEhs_icam.IAbsentOrFailedControlsNode recursiveChildNode;
// if(wdContext.nodeAbsentOrFailedControls() != null){
// set header data:
wdContext.currentHeader_CreateElement().setRecord_No(wdContext.currentHeader_GDElement().getRecord_No());
wdContext.currentHeader_CreateElement().setRecno_Root(wdContext.currentHeader_GDElement().getRecno_Root());
wdContext.currentHeader_CreateElement().setIncident(wdContext.currentGPInputNodeElement().getIPIncidentNum());
//Top Level Node (Singleton)
existingAbsentOrFailedControlsElement = wdContext.currentAbsentOrFailedControlsElement();
//We need to go through the values of the RECURSIVE node as that is where the values are!
//Each time we expand a node in the tree this recursive node is filled with values
for(int i = 0;i<existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().size();i++)
recursiveChildNode = existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().nodeRecursiveAbsentOrFailedControl(i);
for(int m = 0;m<recursiveChildNode.size();m++)
recursiveChildElement = recursiveChildNode.getAbsentOrFailedControlsElementAt(m);
if(recursiveChildElement.getCheck())
//New line in the "table":
rootCause = new Bapi1240_Rc();
rootCause.setFunction("009");
rootCause.setHierarchy_Key("EHS_IAL_STD");
rootCause.setNode_Key(recursiveChildElement.getNODE_ID());
rootCause.setRef_Recno(wdContext.currentHeader_GDElement().getRecord_No());
rootCause.setRef_Object("IAL");
rootCause.setRef_Recno_Smeas("0");
rootCause.setPrimarykey("00000000000000000001");
rootCause.setForeignkey("00000000000000000001");
rootCause.setFlgfrgnkey(true);
rootCause.setFlgprimkey(true);
rootCause.setFlag_Selected(true);
//add the line to the "table":
createInput.addRootcause(rootCause);
}//end if
}//end for
}// end for
// execute:
wdContext.currentBapi_Bus1240_Create_InputElement().modelObject().execute();
// invalidate the output structure:
wdContext.nodeOutput_Create().invalidate();
} catch (CMIException ex) {
msgMgr.reportException(ex.getLocalizedMessage(), true);
//@@end -
Problem while looping through record set and tem table for matching data
hi I am using one record set and ane temp table and looping through both to find the match between dates.
If date matches then it shud do some processing otherwise it will return default values(null values).
FOR i IN student_rec .FIRST..student_rec .LAST /*student_rec.school_date has 01-MAR-2012,02-MAR-2012,03-MAR-2012,04-MAR-2012,05-MAR-2012*/
LOOP
l_return_out.school_date := student_rec(i).school_date;
l_return_out.marks_obtained := student_rec(i).marks_obtained;
FOR i IN selected_dates .FIRST..selected_dates .LAST /*selected_dates has 02-MAR-2012,03-MAR-2012,05-MAR-2012*/
LOOP
DBMS_OUTPUT.PUT_LINE(selected_dates(i));
IF selected_dates(i)=student_rec(i).sett_date
THEN
EXIT;
end if;
---------call procedure P1
-----------get output as ret_val1 /*getting ret_val1 as 10 for 02-MAR-2012,03-MAR-2012,05-MAR-2012 */
----------call procedure P2
---------get ouput as ret_val2 /*getting ret_val1 as 20 for 02-MAR-2012,03-MAR-2012,05-MAR-2012 */
if ret_val1>0 0r ret_val2>0
then
l_return_out.has_csts := yes;
l_return_out.cst_present := 10;
l_return_out.cst_absent := 20;
else
l_return_out.has_csts :=No;
l_return_out.cst_present:= 0;
l_return_out.cst_absent := 0;
end if;
end loop;
l_return_out.has_cst := student_rec(i).has_csts;
l_return_out.cst_missing := student_rec(i).cst_present;
l_return_out.cst_existing := student_rec(i).cst_absent;
PIPE ROW(l_return_out);
END LOOP;
RETURN ;
I am expecting this as result
school_date marks_obtained has_csts cst_present cst_absent
01-MAR-2012 20
02-MAR-2012 30 yes 10 20
03-MAR-2012 40 yes 10 20
04-MAR-2012 70
05-MAR-2012 60 yes 10 20
but this as result
school_date marks_obtained has_csts cst_present cst_absent
01-MAR-2012 20
02-MAR-2012 30
03-MAR-2012 40
04-MAR-2012 70
05-MAR-2012 60
Can anybody please highlight the mistake i am doing while processing the logic??
Edited by: 942390 on Jul 13, 2012 8:44 PM
Edited by: 942390 on Jul 13, 2012 8:45 PMI am getting a set values from a record set....student_rec
and on pipelining this record set from 1st till last
i am getting this
school_date marks_obtained has_csts cst_present cst_absent
01-MAR-2012 20
02-MAR-2012 30
03-MAR-2012 40
04-MAR-2012 70
05-MAR-2012 60
so initially has_csts, cst_present and cst_absent is null for all dates.
now have a temp table of selected_dates(which contains these dates 02-MAR-2012,03-MAR-2012,05-MAR-2012)
now I am want to populate has_csts, cst_present and cst_absent with data only for those dates which is present in selected_dates temp table(02-MAR-2012,03-MAR-2012,05-MAR-2012) and that too has_csts, cst_present and cst_absent will be populated with some condition (based on the values from procedure got from P1 and P2).
so want result set to look like
school_date marks_obtained has_csts cst_present cst_absent
01-MAR-2012 20
02-MAR-2012 30 yes 10 20
03-MAR-2012 40 yes 10 20
04-MAR-2012 70
05-MAR-2012 60 yes 10 20
so what could be the possible solution to obtained this.... -
Loop through all items in all data blocks?
Is there a way to loop through every item in every data block and set the property of a format mask?
I do not know what error it is, only that an on-error trigger fires.
I found out one thing I was definitely doing wrong, using nextblock, nextitem properties at the wrong level.
DECLARE
v_firstblock VARCHAR2(50);
v_currentblock VARCHAR2(50);
v_firstitem VARCHAR2(50);
v_currentitem VARCHAR2(50);
v_counter NUMBER :=0;
v_counter2 NUMBER :=0;
begin
v_firstblock := get_form_property(:System.Current_Form,first_block);
v_currentblock:= get_block_property(v_firstblock,nextblock);
MESSAGE(v_firstblock||v_currentblock);
LOOP
v_counter := v_counter +1;
IF (v_counter >10) THEN
exit;
END IF;
IF (v_currentblock = v_firstblock) THEN
exit;
ELSE
v_firstitem := get_block_property(v_firstblock,first_item);
IF (lower(GET_ITEM_PROPERTY(v_firstitem,format_mask))=lower('mm-dd-yyyy')) THEN
SET_ITEM_PROPERTY(v_firstitem,format_mask,'DD-MON-YYYY');
END IF;
v_currentitem := get_block_property(v_firstblock,first_item);
v_currentblock:= get_block_property(v_currentblock,nextblock);
GO_BLOCK(v_currentblock);
LOOP
v_counter2 := v_counter2 +1;
IF (v_counter2>15) THEN
exit;
END IF;
v_currentitem:= get_item_property(v_currentitem,nextitem);
MESSAGE(v_counter||v_firstblock||v_currentblock||v_firstitem||v_currentitem||v_counter2);
IF (v_currentitem <> v_firstitem) THEN
IF (lower(GET_ITEM_PROPERTY(v_currentitem,format_mask))=lower('mm-dd-yyyy')) THEN
SET_ITEM_PROPERTY(v_currentitem,format_mask,'DD-MON-YYYY');
END IF;
ELSE
exit;
END IF;
END LOOP;
END IF;
END LOOP;
end;Here is updated new code. I am currently trying to debug it, it has crashed my form on the server when tied to a button press.
EDIT: So far I have found that it infinitely loops through the first 3 items and a null item in the first block. Still looking into why...
EDIT: Some code changes to temporarily stop infinite loop and make v_currentblock actually change. Still loops through same 3 items in the first data block even though v_currentblock changes.
Edited by: 878576 on Oct 21, 2011 12:46 PM -
How can I get System's Date and Convert it to a String?
Hello there !
I'm having a bit of a problem. Could anyone help me?
I want to know how to get Today's Date in a String?
Just the Date, and here's the trick.... in this precise Format:
MM/dd/yyyy
So for today my String should contain the value: "02/02/2007"
Please help I am still a learner of the Java programming language.
Thanks in advanceAnd in Java 1.5+:System.out.printf("%1$tm/%1$td/%1$tY\n", new java.util.Date());:o)
~ -
How to Loop through another list and update a column with SharePoint Designer 2013 Workflow
Hi,
I am trying to get my head around the new 2013 Workflow Engine and SharePoint Designer 2013 Workflow Text-Based Designer.
I have two lists.
List A has 2 columns: Title, Completed (Yes/No)
List B has 3 columns: Title, LookupListATitle, Completed (Yes/No)
All the 2013 Workflow components have been installed and configured and I am selecting the 2013 Workflow option in SPD
I am trying to set off a 2013 Workflow when an item in List A is edited to Loop through List B and select items where the LookupListATitle column's value is equal to the Title value of the current item, and set the value of the Completed column for those
items in ListB to "Yes".
I have the Workflow configured like this:
Stage: Stage 1
IF Current Item:Completed equals Yes
Loop: 1
The contents of this loop will run repeatedly while: ListB:LookupListATitle equals Current Item: Title
Update item in ListB.
(The dialog options for the update item action as follows:
List: ListB
Field: Completed, Value: Yes
In the Find the List Item section
Field: LookupListATitle
Value: Current Item: Title)
Transition to stage
Go to End of Workflow
When I update an item in ListA and set its Completed column to Yes, I would expect the Workflow to find all the items in List B where the Lookup column is equal to ListA's Title (there are 2) and update their Completed column to Yes. But it doesn't work.
When I look at the Workflow Status it says the Internal Status is "Canceled" and the information pop up has the following alien language (and may be truncated):
RequestorId: 95f03b62-8956-ac14-c5cf-dc98c89c589c. Details: System.ArgumentException: Invalid JSON primitive: Item001. Parameter name: value at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ConvertStringToJsonNumber(String value) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ReadPrimitive(String
type, XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(Stream jsonStream, Byte[] jsonBytes)
at Microsoft.Activities.DynamicValue.ParseJson(String json) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
executor, BookmarkManager bookmarkManager, Location resultLocation)
Unfortunately I don't have access to the server, logs etc.
I would love to find some tutorials, or any books on SharePoint Designer 2013 in general and Workflows in particular but my searches haven't turned up much so far apart from a pre-release Beginning SharePoint Workflows which is in its very early stages and
not much help yet.
Can anyone give me some guidance on how to set up While Loops to iterate through a related list using SharePoint Designer 2013?
MarkHi,
I understand that you wanted to update the items in the other list (Participants) where the Course equals the Current Item.
You need to use “Call HTTP Web Service" action and “Build Dictionary" action to get the Maxid and then loop Participants to update the items.
You can follow the steps as below to achieve what you want:
Create a custom list named Courses, add columns: Title(Single line of text), Course ID(Single line of text), Course Finalised (Yes/No).
Create a custom list named Participants, add columns: Title(Single line of text), Course(Lookup), CourseFinalised (Yes/No).
Create workflow associated to Courses, start the workflow automatically when an item is created or changed.
Add conditions and actions:
The HTTP URL is set to
https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be order by Id and desc.
Then if Course Finalised is equal to Yes, the CourseFinalised of the associated items in Participants will be updated to Yes.
More information:
http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
Thank you for your understanding.
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Looping through Multiline list in Workflow
We have a Workflow that sends an email with an Office document (ie., Excel) as an attachment to each Executing Service Engineer on service items that are relevant for planning. In an attempt to do that we loop through a multiline list, which is used to hold the relevant service items for processing.
1. We created an activity step Initialize work items count to store the number of service work items, e.g. Work_items_count
2. We use a loop step (loop until) to keep looping while work_items_count has a value greater than zero.
3. Within the loop, we use another activity step Get install item ibase components that processes the first item of the multiline container element Work_items and returns the ibase components for the Executing Service Engineer. After processing has completed, we delete the item from Work_items and decrement the counter work_items_count by 1.
4. As part of the final steps in the loop, an Excel document is created from a template using a standard object method WF_DOC-CREATE. The document is than converted to an SOFM object using standard object method WF_DOC-CREATE_SOFM, and than an email is generated with the SOFM object as an attachment using standard object method SELFITEM-SENDTASKDESCRIPTION.
The problem thats occurring is that on the second loop pass, the status for activity step Get install item ibase components is set to ready expecting user intervention. I know that its a dialogue step, but why than does it execute seamlessly on the first loop pass? Ive set the agent assignment on the Workflow and on the task to General task so that anybody can execute it so I dont think its an agent assignment problem.
Does anyone have any suggestions? Do i need to use dynamice parallel processing in this case?We have a Workflow that sends an email with an Office document (ie., Excel) as an attachment to each Executing Service Engineer on service items that are relevant for planning. In an attempt to do that we loop through a multiline list, which is used to hold the relevant service items for processing.
1. We created an activity step Initialize work items count to store the number of service work items, e.g. Work_items_count
2. We use a loop step (loop until) to keep looping while work_items_count has a value greater than zero.
3. Within the loop, we use another activity step Get install item ibase components that processes the first item of the multiline container element Work_items and returns the ibase components for the Executing Service Engineer. After processing has completed, we delete the item from Work_items and decrement the counter work_items_count by 1.
4. As part of the final steps in the loop, an Excel document is created from a template using a standard object method WF_DOC-CREATE. The document is than converted to an SOFM object using standard object method WF_DOC-CREATE_SOFM, and than an email is generated with the SOFM object as an attachment using standard object method SELFITEM-SENDTASKDESCRIPTION.
The problem thats occurring is that on the second loop pass, the status for activity step Get install item ibase components is set to ready expecting user intervention. I know that its a dialogue step, but why than does it execute seamlessly on the first loop pass? Ive set the agent assignment on the Workflow and on the task to General task so that anybody can execute it so I dont think its an agent assignment problem.
Does anyone have any suggestions? Do i need to use dynamice parallel processing in this case? -
Problem when loop through a list within CollectionModel
In my bean, I have these codes to define a node.
Map<String, Object> node = new HashMap<String, Object>();
node.put("Nodeid", nodeid);
List theColors = new ArrayList();
node.put("Colors", colors);
node.put("Type", type);
node.put("Desc", desc);
Then, a list of these nodes are converted to CollectionModel using ModelUtils.toCollectionModel(nodes);
In my jspx, I am able to loop through nodes, and get Type, Nodeid and Desc from the node to show on the screen.
I am trying to loop through the list of colors within the node to draw circles with different diameter.
<af:forEach var="theColor" items="#{node.Colors}" varStatus="vs">
<dvt:pointLocation pointX="50%" pointY="50%">
<dvt:marker id="mk2" scaleX="#{15-vs.index*2}" scaleY="#{15-vs.index*2}" shape="circle" fillColor="#{theColor}" />
</dvt:pointLocation>
</af:forEach>
But above code does not work.
Can someone help me? Any suggestions?
Thanks.I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
The server produces an html file, and sends it to the client.
Java stops running.
Java cannot call javascript, javascript can not call java. There is no direct communication.
Java code can produce javascript code to run on a page.
The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)
Maybe you are looking for
-
i can't update apps at mac app store - error saying "There was an error in the App Store. Please try again later. (100)" i tried it for weeks and months, but with no success. i am using macbook air mid 2011, running os x lion.
-
Is ATP check possible in Service Order for Sales Item?
Hi All, My question, is ATP check possible in Service Order for Sales Item? My requirement is that when i create a service order in the web UI with a sales item and drill down to the item level, i see the schedule lines assignment block but w/o any C
-
How to use richTextEditor and save to Html
The customer want to edit characters and image with richTextEditor and save the content to html. How to do it? Is there any sample code of that?
-
Bank Details missing - REGUH table
Experts, I am implementing Payment Program. Inspite of maintaining the Vendor bank details, own company bank details under House Bank and creating Bank FI01 (which is Vendor's bank), the bank information is missing in REGUH table. All the bank detail
-
Question to import stylesheets
I have a question to function: Import Stylesheet using on the webserver. I have installed the xmlpserver.ear as a oc4j-instance on the oas webserver version 10.1.3.1. Now a developer like use the function: Import Stylesheet. XSL Syntax: <xsl:import h