Hot to get ITEM NAME
Hello,
is it possible to use *#CURRENT_ITEM_NAME#* in a function parameter?
I want a function based validation and create a function. Then I created a element validation in my page with the PL/SQL-Expression Type and insert this code to start the function.
rpf.vornamecheck(:#CURRENT_ITEM_NAME#)= 1
In this point I dont want to insert the name of the Item manualy, because if I change the item name i also have to change it in the parameter of this validation.
I test it a lot of times, but it doesn't work. Is there a other way to get the Name of an item (NOT LABEL)??
I understand completely what you mean and I agree that it would be very good to have more ways to indirectly reference things to avoid
hard coding page numbers and column_names. I am a newbie also and did not know javascript but I quickly discovered that it was easier to deal with javascript than to try to do things via plsql because javascript is easily available in the running page whereas to call plsql you have
to know a lot more about the page load and page submit and partial page refresh and ajax and so forth. I simply do not know myself if there is a way that a change or blur can trigger a plsql check of that which changed. Maybe so using html_db? There's a big gap in my brain regarding that. I have made a personal choice to just go with javascript and not have to tackle the other ways of doing this because they
are actually harder to understand than I am finding it to learn javascript.
This is the two part javascript way. In this example we call a very simple javascript function timehourCheck which is defined in the
javascript section of the page (other locations are possible). If it doesn't like the hour it actually nukes the item value. Note passing this the event object to the function. Some things 'this' has are this.id (the id which is what you asked about) and this.value the value.
so a question would be is there an equivalent plsql based way of creating the kind of information passing that is obtained via the
this event object in javascript?
html form element attributes
for the page item to be checked:
onBlur="timehourCheck(this);"
javascript part of page contains this:
function timehourCheck(thisobj) {
var mytext = thisobj.value;
if (mytext.length == 0)
{return;}
if (mytext * 1 > 12)
{alert('ERROR time hour ' + mytext + ' is > 12');
thisobj.value = '';
if (mytext * 1 < 0)
{alert('ERROR time hour ' + mytext + ' is < 0');
thisobj.value = '';
} // end timehourCheck
Similar Messages
-
How to get item names as column headings???
Hi,
I've given all the items in my complex folder nice user-friendly names, which can be seen in Desktop and Plus, but when I pull them into a worksheet the column headings revert to the underlying column name. Also, in Plus the list of selected items shows this underlying column name while the list of items in the folder shows the user-friendly names! This is really confusing for users.
Is there a way to get Disco to use the item names? Or do I have to go back to the underlying tables and views and recreate them with my user-friendly names?
ThanksIn Administrator when I look at the item properties, it shows my user-friendly item Name as the item Heading as well, but when I go into Desktop and pull the items into a worksheet, the worksheet column headings SOMETIMES default to the item Identifiers (or the underlying table/view column name in the item Formula), NOT the item Headings.
Here's an example - I have 3 numerical items:
1. Name and Heading are both "IP EL Spells", Identifier is "MONTHLY_ACT_EL", Formula is ""V pbc running totals 0406".Monthly act el"
2. Name and Heading are both "IP EL Spells YTD", Identifier is "RUNNING_ACT_EL", Formula is ""V pbc running totals 0406".Running act el
3. Name and Heading are both "IP EL Spells Prev YTD", Identifier is "PREV_ACT_EL", Formula is ""V pbc running totals 0406".Prev act el"
When I pull these into a crosstab in Desktop to sum them, the column headers are:
1. IP EL Spells SUM
2. Running act el SUM 1
3. Prev Act El SUM
The first heading is correct, the second seems to be based on the Formula or Identifier but I don't know where the "1" comes from or why "act el" are in lower case, and the third also seems to be based on the Formula or Identifier, but in mixed case.
I'm baffled! -
Hot to get group name in obiee 11g
Hi All,
We have a requirement that whenever user login in answers, based on his group he should be able to see only his department data.If some how captures the group name we can filter the data by assisgning the group name to the variable but we stuck up with getting the group name.Please help usVALUEOF(NQ_SESSION.GROUP) shud give u the value of GROUP
http://108obiee.blogspot.in/2009/10/referencing-group-session-variable-in.html
http://gerardnico.com/wiki/dat/obiee/system_session_variable
Pls mark answered if it solves the issue. -
When I create a DDE server with serveral topics, all on the same service and with the same item name (different topic), it appears that an advise link does not function properly. It doesn't work at all, it update only when the advise link is terminated or only one of the topics can use an advise link.
eg.
On one DDE server I have 2 topics:
topic1:
servicename: DDEserver
topicname : C(1)
itemnames : P(1), P(2), P(3)
topic2:
servicename: DDEserver
topicname : C(2)
itemnames : P(1), P(2), P(3)
Only the topicnames differ!
Now I can't get an advise link working on one of the items (sometimes on one, but not
on another).
Normal (non-advise) links are working fine however.
(In my case there is no other solution since this DDEserver should be compatible with an older one, created earlier.)I really don't know DDE very well. It is usually recommended that you switch to using ActiveX. You may not be correctly configuring the netDDE server. There is an example in the reource library that shows how to do this. You may also want to look at the DDE advise examples that came with LabVIEW 5.1 and earlier.
-
How can I get the name of an Array Item in LabVIEW
Hi,
I would need to display the name of the items in the Step.Result.Measurement array in a VI. I can access these properties using the index, but I don't know how to get the name of them like Step.Result.Measurement[0] .
Is there any suggestions to do it in an elegant way?
AndrasHi Andras,
look here.
Regards, Guenter -
Hi All,
I need to retrieve the folder name for where the item is stored to generate a report in following format in csv
File Name Full Path Parent Folder Created By Last Modified By Number of Versions Total Size
My code which gets all other info.
function Get-DocInventory() {
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site=Get-SPSite -Identity "siteURL"
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
if ($list.BaseType -ne "DocumentLibrary") {continue}
foreach ($item in $list.Items) {
$data = @{
# "Web Application" = $webApp.ToString();
#"Web" = $web.Url
"Site" = $site.Url
"list" = $list.Title
"Item ID" = $item.ID
"Item URL" = $site.Url+"/"+$item.Url
"Item Name"= $item.File.Name
“Item Versions” = $item.Versions.Count
"Item Created" = $item["Created"]
"Extensions" = $item.name.split(".")[1]
"Item Modified" = $item["Modified"]
"Item Created By" = $item["Author"]
"Last Updated by" = $item["Editor"]
"File Size" = $item.File.Length/1KB
New-Object PSObject -Property $data
$web.Dispose();
$site.Dispose()
#Get-DocInventory | Out-GridView
Get-DocInventory | Export-Csv -NoTypeInformation -Path D:\Scripts\Hemant\inventory.csv
Coukld you please help me get folder name
Thanks BasvaTo get the full Folder URL you could use:
$item.File.ParentFolder.Url
And just for the Folder Name use:
$item.File.ParentFolder.Name -
Urgent: How to get the names of all menu items
I have a .mmb menu module.
There are many menus and submenus in it.
Now I want to get the names of all menu items available in the module using sql or pl/sql.
Actually I need to store these names in another table as it is. That is why I want get them programmatically.
Any solution please.... bit urgent
ThanksWhen I needed the same, I wrote my own application using
Forms API (Windows,Forms 6.0,6i). Perhaps it will help
you.
Let me know your e-mail and I'll send it. -
Getting the name of a menu from the menu item
Hi everybody,
I'm trying to get the name of the menu that a particular menu item is classified under, and thus far I can't figure out how. Can anyone give me a hand with this, please? I have a SSCCE that describes my efforts so far:
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
public class MenuTester {
public MenuTester() {
JMenuItem item = new JMenuItem( "zzz" );
item.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println( ((JPopupMenu)((JMenuItem)e.getSource()).getParent()).getLabel() );
System.out.println( ((JPopupMenu)((JMenuItem)e.getSource()).getParent()).getName() );
JMenu menu = new JMenu( "test" );
menu.setName( "test" );
menu.add( item );
JMenuBar bar = new JMenuBar();
bar.add( menu );
JFrame frame = new JFrame();
frame.setJMenuBar( bar );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setSize( 300, 300 );
frame.setVisible( true );
public static void main( String args[] ) { new MenuTester(); }
}I've tried the JPopupMenu method getLabel, and the generic Component method getName, but neither of them seem to work, even when I explicitly set the name. The result of both calls is "null", not "test" as it should be. There must be something small that I'm missing, but I'm not sure what, can anyone please tell me what it is?
Thanks,
Jezzica85JMenuItem mi = (JMenuItem)e.getSource();
JPopupMenu popup = (JPopupMenu)mi.getParent();
JMenu menu = (JMenu)popup.getInvoker();
System.out.println( menu.getText() ); -
Getting swatch names of each document item
I'm trying to find a way to loop thru all items in an Illustrator document and get their stroke and fill color. Sometimes items are spots, sometimes documents are set to RGB or CMYK, etc, so swatches can be a mixture of things. Is there an easy way to get the swatch name for each item?
For example, I can check if an item is a spot, and get it's color like so:
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'SpotColor') {
var s = c.strokeColor.spot.name;
But if I try to get the name from an item colored 'Black' (which is set to Process Color, CMYK), then I'll need to do something else like:
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'CMYKColor') {
var s = c.strokeColor.name; // This returns undefined - not sure what I'm doing!!!
Is there an easier way to achieve this, other than getting the typename of each item, and then trying to figure out it's color name? I was hoping something like this would work:
var c = app.activeDocument.pageItems[0].strokeColor.name;
Thanks!
JayThank you Larry. This is very helpful to know!
I chatted with a friend, who knows much more about colors, printing, etc. and now I see that I can only get item swatch names when the item is set to a spot (or global I believe). Process on the other hand will just return specific number values for each color (c, m, y, k). So I think I have a better understanding now.
Thanks.
Jay -
when I right click on autofil a widow comes up with my profiles, I see no way to simply choose one and have all the info filled in. I have to click each item, name , address ect to have it show on whatever form I am trying to fill
You can try one of the form fill extension:
*Autofill Forms: https://addons.mozilla.org/firefox/addon/4775
*Autofill: https://addons.mozilla.org/firefox/addon/262804/
*fireform: https://addons.mozilla.org/firefox/addon/3193
*Formito ( Form Filler ): https://addons.mozilla.org/firefox/addon/formito-form-filler/ -
How to get full names by typing abbreviations in a char item
Hi,everybody
one more question
a char feild in a block as this:
| NY US |
My destination: In this feild ,after I type 'NY',I can get full names 'New York' then space key,type 'US' get 'United states'.(one bye one)
display as --------------------------
| New York United Stated |
I am confusing which trigger I should use,post_changed?
post_text_item?,Validat_item?
I created a table with columns 'City,State,C_fullname,S_fullname' and coded in
Post_text_item trigger using select statements,I can only get the first full name by 'NY',then press space,type in US,press enter,Forms raises a unhandled exception,doesn't display 'United States'.
no correct result up to now.
That is clear?
Thanks a lotOne thing you could try which may not be EXACTLY what you want but would be almost no effort is to create and LOV with all of the States, assign that LOV to the text field and on the text field set the Validate LOV property to YES.
Then if you type Cal and then return you get CALIFORNIA. If you type New and return you get a list of New York, New Jersey....
It may give you most of what you want with no effort.
Regards
Grant Ronald
Forms PRoduct Management -
How to get items from a list that has more items than the List View Threshold?
I'm using SharePoints object model and I'm trying to get all or a subset of the items from a SharePoint 2010 list which has many more items than the list view threshold (20,000+) using the SPList.GetItems() method. However no matter what I do the SPQueryThrottledException
always seems to be thrown and I get no items back.
I'm sorting based on the ID field, so it is indexed. I've tried setting the RowLimit property on the SPQuery object(had no effect). I tried specifying the RowLimit in the SPQuerys ViewXml property, but that still throws a throttle exception. I tried using the
ContentIterator as defined here:http://msdn.microsoft.com/en-us/library/microsoft.office.server.utilities.contentiterator.aspx,
but that still throws the query throttle exception. I tried specifying the RowLimit parameter in the ProcessListItems functions, as suggested by the first comment here:http://tomvangaever.be/blogv2/2011/05/contentiterator-very-large-lists/,
but it still throws the query throttle exception. I tried using GetDataTable instead, still throws query throttle exception. I can't run this as admin, I can't raise the threshold limit, I can't raise the threshold limit temporarily, I can't override the lists
throttling(i.e. list.EnableThrottling = false;), and I can't override the SPQuery(query.QueryThrottleMode = SPQueryThrottleOption.Override;). Does anyone know how to get items back in this situation or has anyone succesfully beaten the query throttle exception?
Thanks.
My Query:
<OrderBy>
<FieldRef Name='ID' Ascending='TRUE' />
</OrderBy>
<Where>
<Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
</Where>
My ViewXml:
<View>
<Query>
<OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy>
<Where>
<Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
</Where>
</Query>
<RowLimit>2000</RowLimit>
</View>
Thanks again.I was using code below to work with 700000+ items in the list.
SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["MyList"];
SPQuery oQuery = new SPQuery();
oQuery.RowLimit = 2000;
int intIndex = 1;
do
SPListItemCollection collListItems = oList.GetItems(oQuery);
foreach (SPListItem oListItem in collListItems)
//do something oListItem["Title"].ToString()
oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;
intIndex++;
} while (oQuery.ListItemCollectionPosition != null);
Oleg
Hi Oleg, thanks for replying.
The problem with the code you have is that your SPQuery object's QueryThrottleMode is set to default. If you run that code as a local admin no throttle limits will be applied, but if you're not admin you will still have the normal throttle limits. In my
situation it won't be run as a local admin so the code you provided won't work. You can simulate my dilemma by setting the QuerryThrottleMode property to SPQueryThrottleOption.Strict, and I'm sure you'll start to get SPQueryThrottledException's
as well on that list of 700000+ items.
Thanks anyway though -
Item '(item name)' could not be moved message
I get the message "The item '(item name)' could not be moved because '(folder)' cannot be modified." when trying to copy files from my iBook to my iMac over the network. This includes Home, Desktop, and other folders. The odd thing is this has worked fine in the past. I checked and File Sharing is enabled on both computers.
However, I can copy files to/from my iBook when on my iMac with no problems.On the iMac, select the folder you're trying to move the items to and choose Get Info from the File menu. Under Ownership & Permissions, verify that your account has Read & Write access to them, and that they are unlocked. Repeat this process with each folder.
(11725) -
I am trying to run a PowerShell script to upload files into a SharePoint site in an Azure environment...the script works fine on my local machine, but every time I run it in Azure (remotely), I get errors. Here is what my simple script looks like...
if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
Write-Host "Loading Sharepoint Module "
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
Add-PSSnapin -Name Microsoft.SharePoint.PowerShell
if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell) -eq $null )
Write-Host "Failed to load sharepoint snap-in. Could not proceed further, Aborting ..."
Exit
#Script settings
$webUrl = "http://sampleWebUrl"
$docLibraryName = "My Documents"
$docLibraryUrlName = "My%20Documents"
$localFolderPath = get-childitem "C:\Upload\Test Upload\My Documents\" -recurse
$contentType = "ContenttType1"
#Open web and library
$web = Get-SPWeb $webUrl
write-host "Web:" $web
$docLibrary = $web.Lists[$docLibraryName]
write-host "docLibrary:" $docLibrary
$files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
write-host "files:" $files
If ($contentType = "ContenttType1")
#Open file
$fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
# Gather the file name
$FileName = $File.Name
#remove file extension
$NewName = [IO.Path]::GetFileNameWithoutExtension($FileName)
#split the file name by the "-" character
$FileNameArray = $NewName.split("_")
$check = $FileNameArray.Length
#Add file
$folder = $web.getfolder($docLibrary.rootFolder.URL)
write-host "Copying file " $file.Name " to " $folder.ServerRelativeUrl "..."
$spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
$spItem = $spFile.Item
write-host "Success"
write-host "SP File:" $spFile
write-host "SP Item" $spItem
#populate columns
$spItem["Column1"] = $FileNameArray[0]
$spItem["Column2"] = $FileNameArray[1]
$spItem.Update()
$fileStream.Close();
Again, I can run this on my local machine and it works just fine, but when I attempt to run it on the Azure environment I get this error...
Get-Item : Cannot find path 'C:\powershellscripts\12653_B7045.PDF' because it does not exist.
At C:\PowerShellScripts\Upload-FilesIntoSharePointTester.ps1:32 char:42
+ $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\powershellscripts\12653_B7045.PDF:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
What strikes me first is the fact that the file its looking for is in the "C:\Upload\Test Upload\My Documents\" directory, but the error keeps saying "C:\powershellscripts\" which is where my script resides and not the files I want to
upload into SharePoint. When I step through the code, all the variables are holding the correct values. The $localFolderPath shows the name of files that I am attempting to upload, so it recognizes them. But once I step through this particular line of code,
the error occurs...
$files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
Is this an error caused because I am remoting into the Azure environment? Has anyone dealt with this issue before? I would really appreciate the help. Thanks
Update: quick thing I noticed is that these two lines of code are returning null values. Again, is this handled differently in Azure or remotely? I ask cause this is the way I know how to do this, locally.
$docLibrary = $web.Lists[$docLibraryName]
$files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()"...square brackets are wildcard characters in Windows PowerShell..."
When you use cd without a parameter it uses the -Path parameter. In this case you'll have to escape the square brackets so they are not considered wildcards. Each of the commands in the first example does the exact same thing.
cd 'Learn PowerShell `[Do Whatever`]'
cd -Path 'Learn PowerShell `[Do Whatever`]'
cd (or Set-Location) also has a literal path parameter (-LiteralPath) that does not require using an escape character (`) before each of the brackets. Hope this helps.
cd -LiteralPath 'Learn PowerShell [Do Whatever]' -
How to get the name of tag or variable
Hi everyone,
I am a newbie, I have problem on getting the name or tag of the variable from OLE for Processing Control(OPC) server, could anyone tell me how I can get the name of tag or variable from writting vb codes or please direct me to any helpful information. Here are
my codes,
Dim ItemsDef(NBR_ITEMS) As String
Dim DeviceAddress As String
Dim IndItem As Long
DeviceAddress = "MBT:152.160.178.60"
'Preparing the Handles for "AddItems"
For IndItem = 1 To NBR_ITEMS
ItemsDef(IndItem) = DeviceAddress & "!40000" & Format(IndItem) '40000 is the memory location of variable in the OPC, how can I get the variable name, what is the code or syntax?
Next
blah...
Thank you,
CalvinHi Calvin,
If you are looking for general information and examples about OPC, then we have lots of places for you to browse!
Here is a small list, and you can probably find other links within these documents:
**If you have Measurement Studio from National Instruments, then you can look at the "Measurement Studio Reference" help file. Search for OPC and in the overview you will find the methods for accessing the items on an OPC server.
**Elsewhere in the help file, you can find a link to this Application Note on our developer zone
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&F4921B34CA8F4A9786256874005BE3F7&cat=7CDA3E51FEFC4AA2862568B80071A1E2
**One more resource is http://www.ni.com/opc
**Probably the most useful will be the examples yo
u can find on our web site. You can go to http://www.ni.com/support and in Option 3 search the Example Code database for "opc".
In the first example program (Controlling OPC Servers with the OPC Automation API in Visual Basic) that you should get when searching for "opc" in the example programs database, look for the line with this code: "browser.GetItemID(leaf)". There you can see the way the program creates an OPCBrowser from the server instance, and then gets the servers available items for use by the client. This sounds like the specific information you are looking for with the variable name.
If you aren't able to find out your answer here or in the various help resources, then please feel free to contact us at National Instruments at http://www.ni.com/ask
Regards,
John N
Applications Engineer
National Instruments
Maybe you are looking for
-
Custom fields mapping issue of sales order replication from R/3 to CRM
Hello Experts, I have to replicate sales orders from R/3 to CRM system (Initial and Delta) The issue is I have custome fields in R/3 which are maintained in custom table(Z table) in R/3. We added those custom fields in CRM customer_i table to synchro
-
PLEASE HELP! SLOW SPEED FOR 5 WEEKS!
Hey all, i've come here as a last resort as im sick of my slow infinity speed and sick to death with bt customer service which does not exist! Since before christmas my bt infinity package 1 38down/10up has been playing up after 12 midnight! usually
-
Need a Video Out conenctor from an '09 iMac to an external Monitor
Hello, As I mention in the subject line, I'm in need of a video only connector to go from my '09 pre-thunderbolt iMac to an external monitor. This connector can go to either a male DV or male HDMI. Thank you!
-
I have had my paid apps for around a year now and recently i did a sync on my laptop and it said i was not authorised to syn certain apps such as "angry birds , Doodle Jump , Fifa 11 Ect. " which i paid for and never had this problem before , can any
-
ALV: issue in truncating decimal values (rounding up)
Hi, I have been receiving a problem truncating decimal values in alv environment using this abap code. WRITE gwa_komv-kwert TO gv_out_tax CURRENCY rte0143sf-currency DECIMALS l_decimals LEFT-JUSTIFIED. where l_decimals = 0. More exactly the v