Get the variables of a function
Hello
In order to reduce the use of the event of calculation in a repetitive subform, I've implemented a function (riskRating) in a script object (calculateRisk), who calls the output of a drop-down list (RA_severity) event.
It is the Javascript in the exit event...
var vLikelihood = RA_likelihood.rawValue; Combo 1
var vSeverity = RA_severity.rawValue; combo 2
var vRisk;
calculateRisk.riskRating (vLikelihood, vSeverity);
Console.println ("risk after function =" + vRisk);
RA_risk_rating. RawValue = vRisk; This line is intended to affect the value of the function vRisk in another discipline (but is not)
It is the function within the script calculateRisk object...
function riskRating (vLikelihood, vSeverity)
{
var vRisk;
If (vLikelihood == null & & vSeverity == null)
{
vRisk = null;
}
on the other
{
vRisk = vLikelihood * vSeverity;
}
Console.println ("risk inside the function =" + vRisk);
Return vRisk;
}
I tried different approaches to get the response from the service and to serve for the rest of the script in the script to output event.
The console are the correct calculation of the function, but it is not updated the variable outside the function.
Any ideas?
Thank you
Niall
Niall,
Take a look at the attachment. The form contains four numeric fields: 'a', 'b', 'total' and 'other '. This a calculation field 'a' and 'b '. On the output of 'b' event, it calls "addNumbers()' in 'MyScriptObject '. The function 'total' updates and returns the value of 'total' to be linked to 'other '.
Form1.Page1.Subform1.b::exit - (JavaScript, client)
other.rawValue = MyScriptObject.addNumbers (a, b, total);
Form1. #variables [0]. MyScriptObject - (JavaScript, client)
function addNumbers (a_, b_, total_) {}
return (total_.rawValue = a_.rawValue + b_.rawValue);
}
-What are you looking for?
Steve
Tags: Adobe LiveCycle
Similar Questions
-
How to get the variable 'dn' in a script
Hello
I have a problem, get the variable "dn" of the script is not a "public" variable, but I'm able to see in the log file. I bet it's in an object java somewhere - I don't know how to access it. No one knows how to get it. I have attached some of the newspaper:)
CN = 8485 [5-6] XX, dn = 8485601 = 9812 cgn, ani = null, dnis = null, clid = null, atype = FORWARD_ALL lrd = 9817, ocn = 9817,
I have a similar problem but I did not find the repo. package... Where?
Thank you
-
How can I get the date and time function to appear as a tile
How can I get the date and time function to appear as a tile
How can I get the date and time function to appear as a tile
WIN8 are delivered with this tile/app. The only way to display the time is to launch the charm bar (Win - key + C) or mouse over to the right up/down. That said go to the Windows store... There are several free applications that display the time / date as a live tile. Good luck.
-
I have recently installed Windows 10 free update. Now I am unable to delete .pdf files and get the invalid error message "Function MS-DOS." It has never been a problem with the previous Windows 8.1. I contacted Microsoft technical support and they told me there is a problem with the .pdf application and I need to contact Adobe Acrobat. This can be corrected?
uninstall any version of acrobat is installed.
clean by Download Adobe Reader and Acrobat tool - Adobe Labs
Restart your computer.
delete all to delete pdf files.
If this fails, it is a problem of ms. If this attempt is successful, then reinstall your acrobat.
-
How to get the variable substitution essbase in ODI
Hi all
I have a problem that I need to get the variable substitution of Essbase /EAS to work on a SQL in ODI.
How can I do in ODI?
Thank you all for...
ThomasHello
If you read my blog:-http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html
In the post, there is a section on the recovery of the essbase substitution variables and their use in ODI.See you soon
John
http://John-Goodwin.blogspot.com/ -
Problems to get the Variables of functions
If possible, could someone explain to me how function to produce variables. Here's what I'm trying to do. I have a CSV file that I'm importing. I would then like to run function for each row in the CSV file and produce able to use in the script.
For example,.
I have a function that looks to see which version of windows operating system and will assign a key to license based on this variable.
Function Determine_Win_License_Key {}
#$erroractionpreference = "SilentlyContinue".
$CSV_Guest_OS = $_. Guest_OS
Switch ($CSV_Guest_OS)
{
2003 x 32 {$GuestOSLicense = "License key 1"; break}
2003 x 64 {$GuestOSLicense = "License key 2"; break}
2008 x 64 {$GuestOSLicense = "License key 3"; break}
2008r2x64 {$GuestOSLicense = "License key 4"; break}
}
}
Based on this function, I set the $GuestOSLicense variable to be used later.
The body of the script looks like this:
Import-Csv csv.csv | %{
Write-host "license key of determination."
Determine_Win_License_Key
Write-host "the used license key is: ' $GuestOSLicense
}
I expect to see what is the license key but all I get output is
"" The used license key is: ".
Someone know or understand why the function runs but does not save the variable generated by the function?
I have several other functions in this script, and each of them do not return the variable.
It's because you return anything in the service.
One way to achieve this is
Function Determine_Win_License_Key { param($OS) #$erroractionpreference = "SilentlyContinue" switch ($OS) { 2003x32 {$GuestOSLicense = "License Key 1"; break} 2003x64 {$GuestOSLicense = "License Key 2"; break} 2008x64 {$GuestOSLicense = "License Key 3"; break} 2008r2x64 {$GuestOSLicense = "License Key 4"; break} } $GuestOSLicense } Import-Csv csv.csv | %{ Write-host "Determining License Key" Determine_Win_License_Key -OS $_.Guest_OS Write-host "The License Key being used is:" $GuestOSLicense }
It is also best to pass a parameter to a function, rather than depend on variables in the function, which are initialized defined outside the function.
____________
Blog: LucD notes
Twitter: lucd22
-
I've been a user of LabVIEW (2011) for about 1.5 years now and just got ahold of TestStand 2014 to try future test as a structure for our needs.
I am using on and off for about 3 days and there is something that has been driving me nuts. When I launch a sequence, and that the report comes at the end, there are three tabs on it: report, steps and Variables. Report and the steps are exactly what I expect to see. However, the Variables tab is always empty. Nothing that I found via my technique of checking everything in menus that looks vaguely related and right click things on many items and these menus for other vaguely related things as well.
I tried looking for references to it, and all I get is the "Main" variable tab you see when you change the sequence, not the one that appears on the report.
See arrow in the image below:
I suspect there is something incredibly obvious that I'm missing, but it's driving me crazy here...
You won't see that filled when a run is complete. The variables are useless at this time here.
If you want to see this populous tab to suspend execution in the middle. Or a breakpoint. Then you can watch the variables at run time.
Kind regards
-
How do addEventListener and get the variable
Hello
I'm getting data from a json and filling on the edge of adobe file but I could not get the id when I click on the image? How can I do this?
$.getJSON("theshort.json",function(data){ var datam = data.urunler; for (var i = 0; i < data.urunler.length ; i++){ var d = sym.createChildSymbol("mynames","Rectangle"); d.$("first").html(data.urunler[i].baslik); d.$("last").html(data.urunler[i].icerik); d.$("resim").html("<img src="+data.urunler[i].resim+" />"); d.$("resim").setVariable("durum",data.urunler[i].id); } AdobeEdge.Symbol.bindElementAction(compId, "stage", "Rectangle", "click", function(sym, e) { alert(e.target.sym.getVariable("durum"));@ }); });
You can find my file below, json
{ "urunler": [ { "id": "24", "baslik": "title 1", "icerik": "Content area 1", "resim": "https://placeholdit.imgix.net/~text?txtsize=20&txt=150×150&w=150&h=150", "sira": "1" }, { "id": "25", "baslik": "title 2", "icerik": "Content Area 2", "resim": "https://placeholdit.imgix.net/~text?txtsize=20&txt=150×150&w=150&h=150", "sira": "2" } ] }
Hello
As data.urunler is an array, you can use forEach().
Data.urunler.forEach ({function (key)
var d = sym.createChildSymbol ("librarySym", "container");
d. $("first") ( key, .baslik) .html.
d. $("last") ( key, .icerik) .html.
d. $("resim") .attr ('src', key.resim) .bind ("click", function() {alert (keyuser.user)});
} );
See also: position an element Via file external JSon and then on mouseover / click on load ID
-
How do I get the output of a function table
Hi all
Kindly share your idea.
I need the outputs of a function table only.
Database version: oracle 10.1.0.2.0
login_details:
login_id branch_code
admin 1
Admin1 2
Test 1
user 1
I need output for the query function below.
Select login_id from login_details where branch_code = '1';
If I create a function:
FUNCTION to CREATE or REPLACE fn_get_login (pvBranch varchar2)
IS BACK SYS_REFCURSOR
REF_TEST SYS_REFCURSOR;
BEGIN
OPEN FOR REF_TEST
Login_id SELECT FROM login_details WHERE branch_code = pvBranch;
RETURN REF_TEST;
END;
/
Select * from login_master where login_id in (select fn_get_login('01') from double);
and get
ORA-00932: inconsistent data types: expected - got CURSER
Edited by: 887268 October 8, 2012 12:25You cannot use a Ref cursor in a table, because it isn't a result set of data, it's just a pointer to a request for enforcement.
{: identifier of the thread = 886365}
A ref cursor must be used if you want to refer the request to an external application.
Transfer data back to a function is to use a pipeline for example function
SQL> CREATE OR REPLACE TYPE num_descript AS OBJECT(num number, descript varchar2(30)) 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE tbl_num_descript AS TABLE OF num_descript 2 / Type created. SQL> SQL> SQL> CREATE OR REPLACE PACKAGE reftest AS 2 FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED; 3 END; 4 / Package created. SQL> SQL> CREATE OR REPLACE PACKAGE BODY reftest AS 2 FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED IS 3 v_obj num_descript := num_descript(NULL,NULL); 4 v_rc sys_refcursor; 5 BEGIN 6 IF p_choice = 1 THEN 7 OPEN v_rc FOR SELECT empno as num, ename as descript FROM emp; 8 ELSIF p_choice = 2 THEN 9 OPEN v_rc FOR SELECT deptno as num, dname as descript FROM dept; 10 END IF; 11 LOOP 12 FETCH v_rc INTO v_obj.num, v_obj.descript; 13 EXIT WHEN v_rc%NOTFOUND; 14 PIPE ROW(v_obj); 15 END LOOP; 16 CLOSE v_rc; 17 RETURN; 18 END; 19 END; 20 / Package body created. SQL> select * from table(reftest.pipedata(1)); NUM DESCRIPT ---------- ------------------------------ 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER 14 rows selected. SQL> select * from table(reftest.pipedata(2)); NUM DESCRIPT ---------- ------------------------------ 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS SQL>
but of course, it is wise to just use pure SQL that in order to mix the PL/SQL in queries in the form of best performance features.
Perhaps explain what problem you are trying to solve when trying to use a function, and we can advise you on the best options.
-
PowerCLI Invoke-VMScript re - ip guest - how to get the variable hostname comments
I run the following script as a task Post-Power-we a re - ip our VMs after that MRS. them rocking. I was able to run this script successfully without the variable hostname of comments (in the test, he runs a script by test VM with the hostname assigned...), but I'm stumped on how to get comments variablized according to the machine's host name works on, it will take the host name and use it in the GuestUser variable and the command - VM. I tried the bold part, but it does not work.
$srv = Connect-VIServer 10.0.0.10 - administrator of the username-password password
$Hostname = (get-wmiobject win32_computersystem). Name
$script = "%windir%\system32\cmd.exe/c c:\dr\drIPsettings.bat".
$HostUser = "root".
$HostPassword = "password"
$GuestUser = ' $Hostname\Administrator '.
$GuestPassword = "password"
$ScriptType = "bat".
SE connect-VIServer 10.0.0.10 - Session $srv. SessionID
Invoke-VMScript - ScriptText $script - VM $Hostname - HostUser $HostUser - HostPassword $HostPassword - GuestUser $GuestUser - GuestPassword $GuestPassword - ScriptType $ScriptType
Thank you!
How you code the - VM on the Invoke-VMScript cmdlet parameter, it seems that Displayname of the guest is the same as the host name.
Can't you just use a loop on guests and then use the displayname property
$script = "%windir%\system32\cmd.exe /c c:\dr\drIPsettings.bat" $HostUser = "root" $HostPassword = "password" $GuestPassword = "password" $ScriptType = "bat" Get-VM | %{ $GuestUser = $_.Name + "\Administrator" Invoke-VMScript -ScriptText $script -VM $_ -HostUser $HostUser -HostPassword $HostPassword -GuestUser $GuestUser -GuestPassword $GuestPassword -ScriptType $ScriptType }
You can encode the Get - VM with more specific selection criteria or use a Where-Object after the Get - VM.
____________
Blog: LucD notes
Twitter: lucd22
-
get the variable in a URL returned
Hello, I have a url returned by a payment Center, and I need to use the information to make the variables of
for example
www.website.com/Cancel.php?OrderID=969 & Currency = GBP & amount = 0% 2E01 & PM = & Acceptance = & Status = 1 & = CARDNO & ED = & CN = & TRXDATE = 06% 2F03% 2F13 & PAYID = 719527322 & NCERROR = & BRAND = & IP = 86% 2E130% 2E167% 2F 99 and SHASIGN 8D01371831130CFADEB12345678911391FD8332D6B
so I need the
$orderID
$currency
$amount
etc...
How this is done?
Thanks in advance
You use the _GET table to retrieve the query string values. http://www.php.net/manual/en/reserved.variables.get.php
Jonathan, please bookmark the guide to php: http://www.php.net/manual/en/index.php
It should be your first stop for basic PHP info.
-
Hello, I am looking an internship of a Clip function variable, put can not get
I use
sym.getComposition () .getStage () .getVariable ("MyVar");
Any idea?
Thank you
Thanhs very much, it works when you put it on the composition of the Stadium ready
sym.setVariable ("var", "FR");
and you use
sym.getComposition () .getStage () .getVariable ("var");
but not with
sym.getVariable ("var");
so for me it's ok!
-
Can I get the variables corresponding to the css properties Java
Hello
I want to be able to get some css like variables Java properties so that I can animate their values.
By css there is no way to perform animations to properties, no discrete way.
Bravo and thank you in advance,You may be interested in tracking progress on:
http://JavaFX-JIRA.Kenai.com/browse/RT-17293 ' CSS Style Object Model in Java.In the meantime, maybe make you use of something like this that drives value into a string of css style.
@Override public void start(final Stage stage) throws Exception { final Rectangle rectangle = new Rectangle(150, 100); DoubleProperty greenness = new SimpleDoubleProperty(); greenness.addListener(new ChangeListener
() { @Override public void changed(ObservableValue extends Number> number, Number oldValue, Number newValue) { rectangle.setStyle("-fx-fill: rgb(0, " + newValue + ", 0);"); } }); Timeline t = new Timeline( new KeyFrame(Duration.ZERO, new KeyValue(greenness, 0)), new KeyFrame(Duration.seconds(5), new KeyValue(greenness, 255)) ); t.setCycleCount(Animation.INDEFINITE); t.setAutoReverse(true); t.play(); stage.setScene(new Scene(new Group(rectangle))); stage.show(); } -
Cannot get the Variable text to read metadata
Hello
I have a problem loading XMP metadata in a text variable. I tried the following procedure on two computers and no results (Windows 7, InDesign 5.0 and 5.5)
Here are the basic steps:
1. create a new InDesign Document.
2. navigate to the FILE > FILE INFORMATION
3. when the XMP data appears, place the word "Test", "Test1", "Test 2"and "Test 3" in the fields title, author, author title and Description and press OK.» See screenshot.
4 make a text box.
5. place the text insertion cursor in the text box then go to the open TYPE > TEXT VARIABLES > DEFINE.
6. when the dialog box opens, select NEW...
7 name the new text Variable 'Author' and select 'METADATA CAPTION"type:"author"for METADATA: then press OK.
8. press INSERT to put the new text variable "Author" in the text box.
Whenever I get an indication < no intersection link > . Can someone help me understand what I'm doing wrong here?
I believe that this text variable is used when generating the captions of images using the legend.
Without my regurgitate description complete, see InDesign help > combining text and objects > legends and read how this feature is used in InDesign CS5 and 5.5.
-
get the check-in date function time
Hello
IM creating a website that generates leads. When a lead is generated, it will select a broker in the list based on certain criteria. The thing I have to do is select the broker that was used last.
There is a datetime field in my database which is used with the createodbcdatetime function
How can I do this
Thanx
CarlySorry, my mistake... you need not establish a correlation between the two tables on brokerid.
SELECT TOP 1 brokerid, contactname
BROKER
WHERE dateandtimelastvisited = (SELECT MIN (dateandtimelastvisited)
THE BROKER)
AND dateandtimelastvisited IS NOT NULLPhil
Maybe you are looking for
-
Hi members I bought a n800v evo with graphic problem when I turn on the bright display for a few seconds then going black.the hard drive starts in the victory. I tried with F8 fn could nothing not happening could help someone, I check all the connect
-
Why does not start the windows firewall with advanced service on my windows 2008 r2 box?
Dependent services are running, there is no option in windows to remove/reinstall the firewall features, and the event log displays a generic message, indicating only that the service is stopped.
-
0Auth 1.0.0 is no longer acceptable with Google Drive
Hello I try to download a file from my android (4.1.2), using Sandisk (2.1.2) Google Drive, now it no longer works. Now it reads Service is disconnected. Please sign in again in "Change Service logon information" in the settings. In doing so the mess
-
I try to display a GPX file. When I try to view or open the file I get a message that says: I need Windows XP SP2 or higher. I need to download windows XP sp2, while I have Windows Vista?
-
Inaccurate touch screen / scrolling problem
I hope some of you can help me with the following problem: I have the Z3 Compact for about 2 months now. Everything is ok, except for the fact that my screen is very imprecise at random moments. When apping, if I want to correct a mistake with the 'x