Call function with select arguments
Hi Gurus,
I have problem to call function inside select statements as follow:
select a.ID_ELE2, a.ID_ELE3, a.DT_FIS_YR, c.NU_FIS_PER, c.dt,
(case
when c.ld is null then
GET_LD_CHECK (a.DT_FIS_YR,c.NU_FIS_PER, a.ID_ELE3, a.ID_ELE2) -- 1
-- GET_LD_CHECK ('2009',7, '8010', '7493') --- 2
else
c.ld
end ) description
from ACCOUNT a, TRANSACTION c
where a.DT_FIS_YR ='2009'
and a.ID_ELE3 <> '0000'
and c.TY_SRC not in ('CL', 'CN')
and a.DT_FIS_YR = c.nu_fis_yr
and a.AK = c.AK_FGCHAR
and trim(a.ID_ELE3) ='8010'
and c.NU_FIS_PER <> 14
order by 1,4,5,6
the 1 doesn't output result but the 2 it does! How can pass the select result to the function?
Thanks in advance for your help.
Ben
The statement / function call seems to be ok. So there are not much chances left for your call to return different (=non) values.
1) It could be that you have different values in the column then during your test call.
2) Maybe your function raises an error and that error is supressed in some ugly WHEN OTHERS EXCEPTION => Solution: Get rid of the error handler.
3) datatype conversion. For example if a.dt_fis_yr is a number value, then you should test with number values and not with strings. GET_LD_CHECK (2009,7, '8010', '7493'). Same logic goes for the other paramters, make sure the datatype is correct and matches the function parameter.
Similar Messages
-
Call function with select options problem
Hi there dear SDN community members.
I have got an strange ABAP problem wich function call.
Code1
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'EQ' .
ls_selec-low = '0000000000000000000000000000000000017714' .
APPEND ls_selec TO lt_selec .
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'EQ' .
ls_selec-low = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
iv_bas_plobid = 'Z_DP_POS'
it_selection = lt_selec
it_group_by = lt_group
IMPORTING
et_plob_values = lt_plobs .
Function returns data in lt_plobs itab only for the last product which was appended to the selection table lt_selec.
Whilst
Code2
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'BT' .
ls_selec-low = '0000000000000000000000000000000000017714' .
ls_selec-high = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
Returns data in lt_plobs for all products included in selection tab lt_selec.
What am I doing wrong in case of Code1? Why function does not return data for both products included in selection tab lt_selec?
Will be thankful for help. Regards. P.I am very sorry to take your time unnecessarily.
The problem was caused by data inconsistency in our sandbox system I was developing in.
Be understanding, please.
Kind regards. P.
Ps.
Vinod Nair
The 'Loop' solution has slowed the performance down very much. -
How to call function with varray arguments .
Hi,
I've got function like this:
CREATE OR REPLACE
TYPE VARR_VARCHAR AS VARRAY(256) OF NVARCHAR2(500)
CREATE OR REPLACE
TYPE E_VARR_VARCHAR AS VARRAY(256) OF nVARCHAR2(4096)
FUNCTION find_id(
p_id IN VARCHAR2,
p_special_columns IN varr_varchar,
p_special_values IN e_varr_varchar,
RETURN VARCHAR2;How can I construct call to that function (nvarchar datatype is a need) using only pl/sql and can I do that with pure sql like select f() from dual; ?
I'm on 9.2.0.8 .
Regards
GregGselect find_id (p_id,VARR_VARCHAR('1','2','3'),e_varr_varchar('1','2','3')) from dual;
--sty. -
Hi,
I am getting an error System.Management.Automation.MethodInvocationException: Exception calling "ExecuteQuery" with "0" argument(s): "$Resources:core,ImportErrorMessage;" ---> Microsoft.SharePoint.Client. ServerException:
$Resources:core,ImportErrorMessage;
Following is my powershell script on line
$context.ExecuteQuery(); it is throwing this error.
function AddWebPartToPage([string]$siteUrl,[string]$pageRelativeUrl,[string]$localWebpartPath,[string]$ZoneName,[int]$ZoneIndex)
try
#this reference is required here
$clientContext= [Microsoft.SharePoint.Client.ClientContext,Microsoft.SharePoint.Client, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]
$context=New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
write-host "Reading file " $pageRelativeUrl
$oFile = $context.Web.GetFileByServerRelativeUrl($pageRelativeUrl);
$limitedWebPartManager = $oFile.GetLimitedWebPartManager([Microsoft.Sharepoint.Client.WebParts.PersonalizationScope]::Shared);
write-host "getting xml reader from file"
$xtr = New-Object System.Xml.XmlTextReader($localWebpartPath)
[void] [Reflection.Assembly]::LoadWithPartialName("System.Text")
$sb = new-object System.Text.StringBuilder
while ($xtr.Read())
$tmpObj = $sb.AppendLine($xtr.ReadOuterXml());
$newXml = $sb.ToString()
if ($xtr -ne $null)
$xtr.Close()
#Add Web Part to catalogs folder
write-host "Adding Webpart....."
$oWebPartDefinition = $limitedWebPartManager.ImportWebPart($newXml);
$limitedWebPartManager.AddWebPart($oWebPartDefinition.WebPart, $ZoneName, $ZoneIndex);
$context.ExecuteQuery();
write-host "Adding Web Part Done"
catch
write-host "Error while 'AddWebPartToPage'" $_.exception| format-list * -force
ERROR:
Error while 'AddWebPartToPage' System.Management.Automation.MethodInvocationException: Exception calling "ExecuteQuery" with "0" argument(s): "$Resources:core,ImportErrorMessage;" ---> Microsoft.SharePoint.Client.
ServerException: $Resources:core,ImportErrorMessage;
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at ExecuteQuery(Object , Object[] )
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)
--- End of inner exception stack trace ---
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)
at System.Management.Automation.DotNetAdapter.MethodInvokeDotNet(String methodName, Object target, MethodInformation[] methodInformation, Object[] arguments)
at System.Management.Automation.Adapter.BaseMethodInvoke(PSMethod method, Object[] arguments)
at System.Management.Automation.ParserOps.CallMethod(Token token, Object target, String methodName, Object[] paramArray, Boolean callStatic, Object valueToSet)
at System.Management.Automation.MethodCallNode.InvokeMethod(Object target, Object[] arguments, Object value)
at System.Management.Automation.MethodCallNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
Thanks Sethu for your comments. However i am running this powershell directly on server so believe
SharePointOnlineCredentials is not required.
I have tried it but still giving me same error -
Hi,
I have a Sharepoint 2013 farm I am trying to provision search for (not the same as my other thread). However, I get the below error:
Exception calling "Activate" with "0" argument(s): "Topology does not contain any components of type Microsoft.Office.Server.Search.Administration.Topology.AdminComponent"
In my script, I have the following:
New-SPEnterpriseSearchAdminComponent -SearchTopology $clone -SearchServiceInstance $SearchServiceInstanceServer3 -ErrorAction SilentlyContinue
So I am not sure why the error happens, when I am trying to set this component. However, it's not the first component to be set (index partition on non-local servers first). I can make it first, but why does this error happen?
UPDATE: I have noticed that the usage and health proxy on my farm is/was stopped, but I am not able to access the server(s) to look at this right now. Could this cause this issue?Do you already have Admin component running for the Search Service Application?
Usage and Health Service will not cause this issue.
Please also refer to below discussion to see if it helps:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/02f0b072-aa3a-4b7f-9662-2caf373d1e57/setspenterprisesearchtopology-identity-newtopology?forum=sharepointgeneral
Warm Regards,
Bhavik K Jain
Sr. Software Engineer - SharePoint Administration
Please vote if my reply helps and ensure that you mark a question as Answered once you receive a satisfactory response. -
Hi i am trying to add a new item and update existing field value in a document library with powershell
but i receive below error message.
PS C:\Users\spfarm> C:\Scripts\add.ps1
Exception calling "Update" with "0" argument(s): "To add an item to a document
library, use SPFileCollection.Add()"
At C:\Scripts\add.ps1:24 char:16
+ $newItem.Update <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
#Add SharePoint PowerShell Snapin which adds SharePoint specific cmdlets
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
#Variables that we are going to use for list editing
$webURL = "http://tspmcwfe:89"
$listName = "test"
#Get the SPWeb object and save it to a variable
$web = Get-SPWeb $webURL
#Get the SPList object to retrieve the "Demo List"
$list = $web.Lists[$listName]
#Create a new item
$newItem = $list.Items.Add()
#Add properties to this list item
$newItem["Title"] = "My second item!"
$newItem["Info"] = "s15"
#Update the object so it gets saved to the list
$newItem.Update()
$web.Dispose()
adilHi Adil,
Document Library is different from a normal list. The document library contains files inside it. You need to update the code to add a document to the library. Then you can get hold of the List Item represented by that file and update its properties. Here
is an example:
$WebURL = "http://aissp2013/sites/TestSite"
$DocLibName = "Docs"
$FilePath = "c:\blogs.txt"
# Get a variable that points to the folder
$Web = Get-SPWeb $WebURL
$List = $Web.GetFolder($DocLibName)
$Files = $List.Files
# Get just the name of the file from the whole path
$FileName = $FilePath.Substring($FilePath.LastIndexOf("\")+1)
# Load the file into a variable
$File= Get-ChildItem $FilePath
# Upload it to SharePoint
$spFile = $Files.Add($DocLibName +"/" + $FileName,$File.OpenRead(),$false)
$item = $spFile.Item
$item["Title"] = "New Title"
$item.Update()
$web.Dispose()
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field -
Query AD cause Exception calling "FindAll" with "0" argument(s)
Hi all,
When I query an entry property of AD with PowerShell, i got some problems. Here is the script, what's wrong ? Any idea? Thanks!
Cause error at last line code. (Exception calling "FindAll" with "0" argument(s): "There is no such object on the server)
$MailboxServer = Get-MailboxServer -Identity $Env:COMPUTERNAME -ErrorAction SilentlyContinue
$dc = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$exchOAB = New-Object System.DirectoryServices.DirectoryEntry("LDAP://" + $dc.Name + "/cn=Offline Address Lists,cn=Address Lists Container, " + $MailboxServer.DistinguishedName)
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $exchOAB
$objSearcher.PageSize = 1000
$objSearcher.SearchScope = "OneLevel"
$objSearcher.Filter = "(objectClass=msExchOAB)"
$powershellOAB = $objSearcher.FindAll()This is one of, now, four duplicate posts.
¯\_(ツ)_/¯ -
Call function with arguments in AS3
Hello!
I`m a new in Flex developing, and cannot understand same code
convention, im Java programmer.
How I can write correct function call in ActionScript, my
call: var goodsWnd:CreateGoodsWindow =
PopUpManager.createPopUp(this,
CreateGoodsWindow, true) as CreateGoodsWindow;
I wish call function above with argument, how I do that?
Where my class: public class CreateGoodsWindow extends
extends TitleWindow
public CreateGoodsWindow(data:Object)
}Use PopUpManager.addPopUp() instead of createPopUp().
addPopUp takes an object that has already been instantiated:
var createGoodsWindow:CreateGoodsWindow = new
CreateGoodsWindow(data);
PopUpManager.addPopUp(createGoodsWindow); -
Error while transforming XSLT by calling function with Reflection API
Hi,
I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
Following is code of reflection to invoke function
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
Class c = loader.loadClass(fullClasspath);
Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
Object instance = constructor.newInstance(constructorParams);
Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
public Document myTransform ( Document document ) {
// Reference of Document (DOM NODE) used to hold the result of transformation.
Document doc = null ;
// DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
// Reference of DocumentBuilder used to create new Document (DOM NODE).
DocumentBuilder builder;
try {
// Initialize DocumentBuilder by using DocumentBuilderFactory instance.
builder = factory.newDocumentBuilder ();
// Initialize new document instance by using DocumentBuilder instance.
doc = builder.newDocument () ;
// Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
DOMSource domsource = new DOMSource ( document ) ;
// Creates new instance of TransformerFactory.
TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
// Creates new Transformer instance by using TransformerFactory which holds XSLT file.
Transformer transformer = null;
********* exception is thrown from here onward ******************
transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
// Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
transformer.transform ( domsource , new DOMResult ( doc ) ) ;
} catch (ParserConfigurationException ex) {
ex.printStackTrace();
} catch (TransformerConfigurationException ex) {
ex.printStackTrace();
} catch (TransformerException ex) {
ex.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
//holds result of transformation.
return doc ;
}Following is full exception stacktrace
ERROR: 'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
...........Hi,
Thanks for response.
Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
Document requestObj = /* my code for generating Document object*/
Object[] methodParams = new Object[]{requestObj}
Class[] methodParamsClasses = new Class[]{};
if (methodParams != null) {
methodParamsClasses = new Class[methodParams.length];
for (int i = 0; i < methodParams.length; i++) {
if (methodParams[i] instanceof Document) {
/************** if parameter is instance of Document then I set class type as "Document.class" ***********/
methodParamsClasses[i] = Document.class;
} else {
methodParamsClasses[i] = methodParams.getClass(); -
How to register PL/SQL function with Varchar2 argument in Discoverer
Hi,
I have registered a PL/SQL function in Discoverer Administrator 10.1.2.1. Function has two arguments with data type varchar2. In discoverer I've selected varchar as it doesn't have varchar2.
When i use this function in report using discoverer desktop it gives an error "One of the function argument has an incorrect datatype.
I would appreciate if somebody can help
Regards
BAHi,
First, do not wait to use it in order to check it.
In the discoverer admin you can "Validate" the function on after registering it.
there are couple of things you should know about registering the function:
1. the "Varchar" option you selected is correct (there is no varchar2 in the admin definition).
2. check the database function to verify that you indeed registered all its arguments and they match the names and types of the db function.
3. during the registration, type everything in UPPER CASE.
the other way to register the function (and you will not need to deal with the definition of it) is to search for the function in a list.
in order to do that, on the register function screen press the "Import" button (on the bottom right side of screen).
then search by the owner (db user / schema) that the function / package is registered.
Tamir -
I have a function that performs DML. I am calling the function from toplink with the following. I get an error
ORA-14551: cannot perform a DML operation inside a query when I try to execute this function. Is there another way to call functions without using select From dual?
String queryFunc = "SELECT " +
"CCU.adjPaymentTrans(#caseID, #obligorPIN, #ccuPIN, #transCd, #payorTp) " +
"FROM dual";
SQLCall sqlCallFunc = new SQLCall(queryFunc);
ValueReadQuery valueReadFunc = new ValueReadQuery(sqlCallFunc);
valueReadFunc.addArgument("caseID");
valueReadFunc.addArgument("obligorPIN");
valueReadFunc.addArgument("ccuPIN");
valueReadFunc.addArgument("transCd");
valueReadFunc.addArgument("payorTp");
valueReadFunc.bindAllParameters();
Vector theArgumentValuesFunc = new Vector(6);
theArgumentValuesFunc.add(caseID);
theArgumentValuesFunc.add(obligorPIN);
theArgumentValuesFunc.add(ccuPIN);
theArgumentValuesFunc.add(transCd);
theArgumentValuesFunc.add(payorTp);
Number amountReversed = (Number)uow.executeQuery(valueReadFunc, theArgumentValuesFunc);Normally DML is only done from stored procedures, not stored functions, you may want to consider changing the function to a procedure.
To call a function that does DML, you must call the function through a PLSQL call. If you did not require the return value, the code would be:
>>
String queryFunc = "begin " +
"CCU.adjPaymentTrans(#caseID, #obligorPIN, #ccuPIN, #transCd, #payorTp);" +
"end;";
SQLCall sqlCallFunc = new SQLCall(queryFunc);
DataModifyQuery modifyFunc = new DataModifyQuery(sqlCallFunc);
>>
If you require the return value, then the SQL would be:
>>
String queryFunc = "begin ? = " +
"CCU.adjPaymentTrans(?, ?, ?, ?, ?);" +
"end;";
>>
However this would have to be executed through a CallableStatement in JDBC. TopLink currently only supports executing stored procedures as callable statements, so you would need to execute this directly through JDBC. You could also convert the function to a procedure, or wrap the function with a procedure. I believe TopLink 10.1.3 will have support for a StoredFunctionCall that can call DML stored functions.
To get a JDBC connection from a TopLink session uses,
UnitOfWork uow = session.acquireUnitOfWork();
uow.beginEarlyTransaction()
uow.getAccessor().getConnection();
uow.commit(); -
CALL FUNCTION WITH STARTING NEW TASK
Hi All,
i'm call a function module through
CALL FUNCTION 'Y_WIN' DESTINATION 'rfc_destination' then it's give right result but when i want to call with starting new task then
CALL FUNCTION 'Y_WIN' STARTING NEW TASK 'INFO' DESTINATION 'rfc_destination'
it does nt provide me any data. i have check in debugger call fm is wkging fine so pls clear me why i'm nt geeting result.
pls give ur suggestions,
AnujDid you use the PERFORMING <form> ON END OF TASK to get the results back; like in the following sample
CALL FUNCTION 'SAPWL_STATREC_READ_FILE'
STARTING NEW TASK taskname
DESTINATION list-name
PERFORMING read_outtab ON END OF TASK
EXPORTING
read_start_date = s_date
read_start_time = '000000'
read_end_date = s_date
read_end_time = '235959'
EXCEPTIONS " failure when calling RFC
communication_failure = 1 MESSAGE msg_text
system_failure = 2 MESSAGE msg_text
RESOURCE_FAILURE = 3.
and
FORM read_outtab USING taskname.
* Receive results back
RECEIVE RESULTS FROM FUNCTION 'SAPWL_STATREC_READ_FILE'
TABLES
v2_normal_records = outtab
EXCEPTIONS " from the called FM
nodata = 1.
Regards -
Cannot call functions with this[]
Hello,
I'm in trouble because I need to call functions from MCs with
a variable
name.
I tried to use this[] that should do the trick, but it
doesn't.
Here's what I did in code to try to debug :
- trace what's inside the this[]
- the actual this[]
- a cut and paste of the above trace() with the function call
Of course, both "hardcoded" calls work..; what am I doing
wrong ?
Here's the code :
trace(_parent + "." + buttonName);
trace("_parent." + buttonName);
this[_parent + "." + buttonName].setBtnState("test1");
this["_parent." + buttonName].setBtnState("test2");
_parent.mcBtn1.setBtnState("test3");
_level0.mcInt.mcBtn1.setBtnState("test4");
What am I supposed to feed this[] with ? Path as a string ?
Thanks in advance.
PJWhat you need to feed the array operator is a string or a
variable that can be resolved to a string. And that string needs to
be the sole name of an instance or property of something that can
be found in that object.
So the reason the ones with the "_parent.mcMe" didn't work is
because there is no object with the name "_parent.mcMe" inside of
this. There is a _parent object and inside the parent object there
is an mcMe, but that isn't the same thing.So you need to pick out
the path one item at a time.
this["_parent"]["mcMe"]["testMe"]();
Should also work. And any of those string litterals could be
replaced by a variable which held a string as well. Also notice
that the function at the end can also be referenced since you are
looking inside the mcMe object for some object with a name of
testMe. But the parens which call the function need to be outside
the array access because they aren't part of the name of the
object. -
Call function with rfc or not ?
How can I know that an function is called by rfc or not ?
info : The caller is not R/3 system. This web interface...
thanks in advanceHi Stephan,
Try this FM
TRANSACTION_CALL_VIA_RFC
Data : v_bdi_line type bdi_line.
Call Function 'TRANSACTION_CALL_VIA_RFC'
Exporting
tcode = sy-tcode.
importing
transaction_data = v_bdi_line.
Exceptions
tcode_not_exist = 1.
if sy-subrc ne 0.
It means it is RFC call.
endif.
Reward points if it helps you.
Regards,
Sudhakar. -
(JavaScript, CS3) calling functions with arguments on click?
Hi all,
this is getting tricky:
I want to call a function when the user clicks on a button in my scripted application (a javascript window dialog).
Unfortunately, I need to pass several arguments to the function.
According to the scripting documentation, ".onClick" functions won't take arguments.
I would (somewhat reluctantly) work with (global) variables but the function itself is limited to variables within its own scope - blocking all variables set in main()
How should I approach this?
The basic idea is to have people set some settings in the UI and then do some things after they click ok.
The actual work is pretty complicated (replacing colors etc) and needs to be done to a lot of objects so it would make sense to do it in a function.
I'm pretty confused right now and don't know how to proceed.
Any hints are appreciated.
Many thanks,
MikeIt took some tinkering but I got it to work.
But I still don't see how I can access the whole DOM from within the onClick functions:
I can get to the dialog properties (this.parent.parent) but nevertheless don't have any way to access app.documents and such.
I was able to manage my way around by making the whole window a dialog instead of a window - thereby getting a return value from the OK button and being able to run the code from within main().
Still strange, though...
Cheers,
Mike
Maybe you are looking for
-
if (this.DataCenterLaborFileUpload.HasFile) var extension = Path.GetExtension(DataCenterLaborFileUpload.FileName); string currentName = ""; decimal currentHours = 0.00M; decimal currentF
-
My Back up is no longer there! Help me!
After updating to the worst update of my phones life, ios5. I instantly couldnt receive any text messages.. It kept saying my sms inbox was full.. now I know thats impossible because I had used not enough half of the memory. So I tried everythin
-
JMS Adapter: Disabling debug log
Hi All, we are having trouble with the JMS Adapter. Adapter is showing message in the opmn/default oc4j intance log growing until 15gb or more.. Is there a way to disable the JMS transaction log ? Log is showing the following lines: <2010-02-25 13:12
-
I have always been able to remote access to my office email through VPN access. Now when I try to, a Java preference box pops up and there seems to be no way to get past it. Before, java would just load. Now it won't. I had my operating system upgrad
-
Can't open WMV files in Quicktime. How can I reinstall Quicktime?
For some reason I am unable to open WMV files in Quicktime even though I have Flip4Mac Player Pro (WMV files played fine in Quicktime until recently). ANY help would be GREATLY appreciated!