Dropdown box with query *and* static values?
Hi guys,
If I had a dropdown box with a LOV being generated from a query,
Select distinct PERSON from USER_TABLE
Bill
Fred
Steve
Is it possibe to somehow add static values so that they sit permanently on top of what ever values are produced by the query?
Null
Not Null
Bill
Fred
Steve
Thanks,
Neil.
select 'Null' d, 'Null' r from dual
union all
select 'Not Null' d, 'Not Null' r from dual
union all
select distinct person d, person r from user_table
...like that?
Scott
Similar Messages
-
Js-confirm box with request and passing value: incorrect url
Hi folks!
Scenario: User clicks on link-column field in tablular form, Confirm box pops up with a confirmation message, with "OK" generates a request and should pass a value from the form into an item for further processing.
The URL in the column link as of now looks like that:
javascript: apex.confirm("message goes here...", {request:"EQDONE", set:{"P2100_X": "#EQMID#"}});For some reason just nothing happens. When I omit the "javascript:", I get an unvalid-url error message. But if I change the procedure name, shoudln't I get some error message also?
Please tell me what's wrong. Thank you! :)Hmm... Ok, makes sense... a little.
The use of (in my case) #EQMID# works, if the target is not URL but "Page in App", and you use the Column Link Dialog fields "Name" and "Value", but maybe because at this point it gets renderes into html and not when called from a javaScript function? Thats how I understand it now.
However: I have just looked into the html-sourcecode. The java Script call IS actually fully rendered with the corrosponding IDs.
This is a sample of one table row:
<tr class="even"><td align="left" headers="Erfasst">13.08.2012</td><td align="left" headers="KundenNr">4784668</td><td align="left"
headers="Kontrolle">XML-Abrechnung - Abrechnungsart überprüfen bei KundenNr: 4784668</td><td align="left" headers="Details">TD, STEWEAGSTEG_LF:
Papier+Archiv (GK)</td><td align="left" headers="Ausnahme bis">-</td><td align="left" headers="bearbeitet von">-</td><td align="center" headers=
"'ERLEDIGT'"><a href="javascript: apex.confirm("message goes here...", {request:"EQDONE", set:{"P2100_X": "34"}});" ><img src="wwv_flow_file_mgr.get_file?
p_security_group_id=6519817386341009&p_flow_id=150&p_fname=ausnahmeBtn_check.png" alt="" title="Fehlerhaften Verrechnungstyp im SDK-PS ausbessern
und Eintrag als erledigt kennzeichnen."></a></td><td align="center" headers="'AUSNAHMEREGELUNG'"><a href="f?p=150:2100:1212226464451606:EINGAU
SNAHME:NO::P2100_KUNU_AUSNAHME,P2100_EQMID,P2100_DATEPICK_AUSN:4784668,34," ><img src="wwv_flow_file_mgr.get_file?p_security_group_id=
6519817386341009&p_flow_id=150&p_fname=ausnahmeBtn.jpg" alt="" title="Diesen Kunden als Ausnahmeregelung bis zu vorgegebenem Datum deklarieren.">
</a></td></tr>The set statement containe the correct ID in each row! Here 34.
So, according to http://docs.oracle.com/cd/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#AEAPI274 , it should work.
Anyway, I will try your suggestion using the fnn array.
Edited by: tpetri on 16.08.2012 08:34 -
How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
I currently run OS X 10.10.1
Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
Here is an example of what i want to happen.
I will have 2 tabs: Contact | Sales
Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
Now how do i do this, Excel can do this so how can numbers do it?Hi Shegra,
Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
quinn
Script starts:
-- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
property DataEntryTable : "Sales" --name of table with popups to be refreshed
set copyRange to {}
property PopValueSheet : "Sheet 1" --name of sheet with popup values table
property PopValueTable : "Contacts" --name of table with popup values
set PopStartRow to {}
tell application "Numbers"
set d to front document
set ps to d's sheet PopValueSheet
set pt to ps's table PopValueTable
set s to d's sheet DataEntrySheet
set t to s's table DataEntryTable
set tf to t's filtered --this records filter setting on data Entry Table
display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
set PopStartRow to {text returned of result}
tell pt --convert list to alphabetized popups
set ptRows to count rows
set copyRange to ("A2:" & name of cell ptRows of column "A")
set selection range to range copyRange
set selection range's format to text
sort by column 1 direction ascending
set selection range's format to pop up menu
-- popupsmade
set selection range to cell ptRows of column 1 of pt
set v to value of cell ptRows of pt
end tell
activate application "Numbers"
tell application "System Events" to keystroke "c" using command down
tell pt
set selection range to range copyRange
set selection range's format to text
end tell
tell t
set filtered to false
set tRows to count rows
set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
set selection range to range pasteRange
tell application "System Events" to keystroke "v" using command down
set filtered to tf
end tell
end tell -
Dropdown box with WAD 3.x
Hello,
I work with the WAD 3.x. And have the following problem:
On the WAD There is a dropdown box with the value of 0CALMONTH.
When I select a value I want two actions:
- To change a quer y on the same WAD.
- Build an url so i can open a second WAD with the selection of the dropdown box.
Both things can work, but not together.
The first point works as a default WAD dropdown box with the value of 0CALMONTH. The selection of the dropdown box is affected to the dataproviders(option of the dropdown box) to change the query.
For the second i use a HTML Form to capture the selected value:
<form name="frmState"> Kalenderjaar/maand
<select name="calmonth" class="SAPBexDdl" on change="window.location.href=SAP_BW_URL_Get() + '&datum=' + options[selectedIndex].value";>
<object>
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="DROPDOWNBOX_1"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
<param name="DATA_PROVIDER" value="DATAPROVIDER_21"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="IOBJNM" value="0CALMONTH"/>
<param name="BOOKED_VALUES" value=""/>
<param name="SHOW_LABEL" value=""/>
<param name="ONLY_VALUES" value="X"/>
<param name="NO_REMOVE_FILTER" value="X"/>
<param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_2"/>
ITEM: DROPDOWNBOX_1
</object>
</select>
</form>
But here
<param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_2"/>
Doesnu2019t work to change the value of the query on the same WAD>
Someone an Idea how to combinate this to selections?
Kind regards,
Harrie LohuisSo nobody has a hint. Nobody experienced this kind of trouble?
-
i have a problem with mail. the spelling and grammer check box before sending the messege is no longer there. I did everything but cannot get it back. is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
Also the mail is acting very funny by not getting the rules work in a proper method. Is ther a software to repair mail.i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check.
This problem just started for about 3 to 4 days now. earlier it was working normally. -
How to create a transport request with query and only with its structure.
HI guru,
how to create a transport request with query and only with its structure.transport request should not include any other query items like ( variables, conditions...etc)
thanks in advance.
venkataHi,
Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
Regards,
anil -
I was in a chat box with SKYPE and I clicked on the link to copy the text but it came back with "can't copy because not permitted in your browser"
I can highlight copy and paste from other web screens with no problem.
The chat window however doesn't give access to the lines that have scrolled past the window so highlighting the text won't work. Other chat windows grab the entire text when the user clicks on the copy link or icon.
I just installed firefox and haven't tried other chat windows to see if the problem could be repeated.Use the keyboard if the buttons on the web page aren't working.
* Copy: Ctrl+C or Ctrl+Insert
* Paste: Ctrl+V or Shift+Insert
* Cut: Ctrl+X or Shift+Delete
*http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard -
Query Issue with adding a static value
I have written a query in SAP that works the way I need it to. I am going to schedule it so that SAP does a file transfer of the output to another area where the data will be accumulated.
My problem is that I want the name of the system to appear at the end of each line but it is not in any table I can find to match up with the userid.
EX:
UserID Group System
JDOE HR Query Group P201
The field for system is not in any tables but I want to add it and give it a constant/static value all the time in the output.
Any ideas?
Thanks!
Justin Dauby -- SAP Security Analyst
Kimball International Inc.,The name of the system is not in a table, but rather a structure called SYST. You can evaluate it using the system field sy-sysid.
Another option is to call function module RFC_SYSTEM_INFO. The export parameter RFCSI_EXPORT will deliver the system id from component RFCSYSID of the structure RFCSI.
Cheers,
Julius -
Using a dropdown box to change the specified value of a radio button?
I have a form that generates the body text for an email.
First there is a dropdown box in which the choices are either "red" or "blue"
Further down the page, there is a radiobutton list with 2 items "available" and "unavailable".
The specified values for these items (as defined on the binding tab) are "have blue hats" or "do not have blue hats".
This value is concatenated in the email body textfield which is to be copied by the user to an email body:
Concat("Dear", NameField, "," We ", RadioButtonList, " today. ") // Dear Persons Name, We have blue hats today.
Is there any way to change the value of the selected radio button based on the selected dropdown choice?
So if the user selected "red" in the dropdown field, the radio button values could become "have red hats" or "do not have red hats"?
Or perhaps there is a better way from the start?
Thanks!Ok, so now I've done that...
But is there a way to change that value with another field (ie when a user chooses "red" or "blue" in a dropdown box) so that the concatenated message reflects both the users choice of color and the availibility?
I'm guessing I should probably use an intermediary text box and put
InterText.rawValue = Concat ("We have ', dropdown1, " hats today") in the change event of the available radio button and:
InterText.rawValue = Concat ("We do not have ', dropdown1, " hats today") in the change event of the unavailable radio button.
then concatenate that box in the final textbox. -
Problem with QofQ and Null Values
Just converted from CF5 to CF7. Finally figured out what was
causing the error message :
"The value "" cannot be converted to a number" when running a
QofQ. It happens whenever there is a NULL (and I think a ZERO)
value in the QofQ. I'm using the QofQ in a seperate chart program.
The main query merges data from a store and a region table.
I'm doing a LEFT OUTER JOIN to combine the REGION with the STORE,
AND so that stores with NO SALES for a given day will show up as
ZERO. On the main report, when I don't use a QofQWhen grouping by
DAY or MONTH, I can test the value in the CFOUTPUT for NULL or ZERO
and display "0" or "N/A" on the report.
But when I try to chart it, using a QofQ to read in the
values from the main query, and format the numbers, I get this
error message. I've tried using the CAST function, using FLOAT,
DOUBLE, BIGINT, etc., but still get same error message.
The only way I could fix this is to add a WHERE statement to
the QofQ, that only includes sales values greater than ZERO. But
then, I have gaps in my chart because stores with NO SALES for a
given day or MONTH don't appear. Because they are removed from the
query. The whole point of LEFT JOINS is to include items with no
values (or NULL) values.
Does anyone know if it's possible to keep these values in a
QofQ? So that items (e.g., store locations in my case) with NULL or
ZERO values for some or all days or months can be charted? Even
with a ZERO value? I've read everything I can get my hands on
regarding QofQ, the CAST function, etc., but nothing seems to work.
Thanks for any help. (FYI, didn't have this problem with CF5. It's
QofQ could handle NULL or ZERO values without providing an error).
GaryWell, I tried the IsNull function on the 3 SUM() values I was
calculating in my SELECT statement (on a LEFT OUTER JOIN QUERY),
and I STILL got another "cannot convert "" to a number" but this
time the error message was more direct, and pointed me to a DATE
field in my query, where I was SORTING AND GROUPING either by DAY
or MONTH (depending on what user selected on form).
In my QofQ, I'm not just reformating the integer SUM()
values, but also the date values. So, I applied the IsNull()
function to the DATE values in my main query. I still kept getting
errors. But after experimenting ((SQL Server BOL docs doesn't give
ISNULL() examples for DATE FIELDS, only NUMBER fields), I tried
putting the dates in SINGLE QUOTES in my IsNull() function, the
QUERY RAN. Then I wasn't sure WHAT date to enter, e.g., 1/1/1889 or
1/1/2001, etc.
Then, I discovered, after experimenting, that you cannot just
blindly enter ANY date when using IsNull in a date field,
especially if you are using CFGRAPH to chart the results by day.
You have to select a date within the date range the user selected,
so this means using the FORM.DATE (or URL.DATE) value from the
form. Here's the working example from my SELECT main query:
SELECT SUM(ISNULL(d.ttldb,0)) AS SumOfDB,
SUM(ISNULL(d.ttldbv,0)) AS SumOfDBV,
SUM(ISNULL(d.ttldbi,0)) AS SumOfDBI,
<CFIF '#url.reptype#' IS "DAILY">
ISNULL(d.depday, '#url.date1#') AS depday
<CFELSE>
month(ISNULL(d.depday, '#url.date2#')) AS TranMonth,
year(ISNULL(d.depday, '#url.date2#')) AS TranYear
</CFIF>
Then I discovered that whatever date was used in the URL.DATE
field (in my case it would be one of the two date field from the
form, and depended on whether you coded DATE1 or DATE2, the chart
would always show ZERO values for that date. So I tried putting the
IsNull() date values in the GROUP BY and ORDER BY statements, e.g.,
<CFIF '#url.reptype#' IS "DAILY">
GROUP BY ISNULL(d.depday, '#url.date1#')
ORDER BY ISNULL(d.depday, '#url.date1#') DESC
<CFELSE>
GROUP BY year(ISNULL(d.depday, '#url.date2#')),
month(ISNULL(d.depday, '#url.date2#'))
ORDER BY year(ISNULL(d.depday, '#url.date2#')),
month(ISNULL(d.depday, '#url.date2#'))
</CFIF>
And this worked. The report ran just fine, and the chart
charted every value correctly.
I guess you have to learn all the little "quirks" about CF7
and how it's QofQ and chart programs work. But so far, so good.
Thank you all for your help. Now I've got to update other old
CF5 programs that are returning errors when there are null values
from my LEFT OUTER JOIN queries. Will take some time, but at least
I know how to do it. Thanks to your help.
I really appreciate your time and efforts to help with this
issue.
Gary -
Pop up box with Ok and Cancel choices, not working. Please Help.
Hello! I am trying to create a pop up box that allows users to choose Ok and Cancel (i'm just testing with Ok and Cancel for now). For some reason when I run it a CMD line pops up and closes very quickly, but i do not get errors. Here is my code:
private void button1_Click(object sender, EventArgs e)
PopupForm popup = new PopupForm();
DialogResult dialogresult = popup.ShowDialog();
if (dialogresult == DialogResult.OK)
Console.WriteLine("You clicked OK");
else if (dialogresult == DialogResult.Cancel)
Console.WriteLine("You clicked either Cancel or X button in the top right corner");
popup.Dispose();
Please help!
Thanks
- Rocketman123Hi Rocketman123,
Per my understanding, you are developing a winform application, but in your code, I see "Console.WriteLine".
So please use MessageBox.Show() instead.
http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(System.Windows.Forms.MessageBox.Show);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Creating a dialog box with OK and Cancel buttons without OADialogPage
Hi Experts,
i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
and need code for the same to handle the buttons.
i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
Plz help.
THANKS IN ADVANCE.
Thanks
Raja.Hi,
I have not tried using javascript in destination URI as suggested by Mukul.
I have tried the below code for opening a page as dialog box.
You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
StringBuffer l_buffer = new StringBuffer();
l_buffer.append("javascript:mywin = openWindow(top, '");
String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
String strUrl = popupUrl.createURL(pageContext);
l_buffer.append(strUrl.toString());
l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
Pass the selected value back to the main page and further you can use it for deleting.
Regards. -
Select distinct using LINQ and bound to a dropdown list with id and display name
Hi,
On one of my sharepoint page, I want to populate dropdown list with countries, namely
<asp:DropDownList ID="ddlCountry" runat ="server"></asp:DropDownList>
In the code, I use LINQ:
var country = (from p in dc.ProvCountries
select p.country_code ).Distinct();
ddlCountry.DataSource = country;
ddlCountry.DataBind();
I want the country_code to be the ID, while the country_name will be the display name in the dropdown, how can that be done?
Thanks in advance.Hi,
The following code for your check.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplicationLib
public partial class _Default : Page
protected void Page_Load(object sender, EventArgs e)
List<ProvCountries> list = new List<ProvCountries>();
list.Add(new ProvCountries { country_code = "201", country_name = "A"});
list.Add(new ProvCountries { country_code = "201", country_name = "B" });
list.Add(new ProvCountries { country_code = "202", country_name = "C" });
list.Add(new ProvCountries { country_code = "202", country_name = "D" });
var country = (from p in list select new { p.country_code, p.country_name }).DistinctBy(p => p.country_code).ToList();
ddlCountry.DataSource = country;
ddlCountry.DataValueField = "country_code";
ddlCountry.DataTextField = "country_name";
ddlCountry.DataBind();
ddlCountry.Items.Insert(0, new ListItem("Please select", ""));
class ProvCountries
public string country_code { get; set; }
public string country_name { get; set; }
static class DataDistinct
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
HashSet<TKey> seenKeys = new HashSet<TKey>();
foreach (TSource element in source)
if (seenKeys.Add(keySelector(element)))
yield return element;
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support -
How to sort 2 dropdown boxes with joined context?
Hi Guys,
I have 2 dropdown boxes that are lined to the same table context.
I do the binding by using the one bind_table method.
one DD is showing the Key while the other shows the description. They both have the same binding.
once the user changes one, new data is selected and the drop downs show the key & description.
What I want to do is to sort each list to be ordered. one by keys and the other by descriptions.
How should I do that?
thanks,
ItayHi,
first,
I would like to mention that there is no joined solution to what I asked here, which is different than what you ask...
You have to make 2 context nodes if you want to sort the data different.
in a drop down, you can't display 2 separate columns.
The only thing you can do is to concatenate the key to the description, something like:
CA - Canada
US - USA
FR - France
if you need to present more than one column maybe it will be best to put a table and link it to some event...
I "solved" this issue by putting 2 drop downs. I wanted to allow the user to select a value from a list and then to change the screen according to his selection.
I did something like:
Choose by key: <dropdownbykey - Key column>
Choose by description: <dropdownbykey - Desc column>
I hope this helps...
Itay -
I am a rookie and need help with max and min values
Hello all, i am into this intro to java class. my assignment is to write a program that prompts the user for two integers and then prints the sum, difference, average, product , distance (absolute value of the difference) Maximum(largest of the two) and Minimum(smallest fo the two) here is my code so far
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math;
public class Sample4
public static void main(String[] args) throws IOException
try // attempt the following
{ // create the stream to read from
InputStreamReader istream = new InputStreamReader(System.in); // create a buffer to hold the stream
BufferedReader console = new BufferedReader(istream); // prompt the user
System.out.println("Enter a number please"); // get input as a string
String input = console.readLine(); // convert to an integer
int num1 = Integer.parseInt(input);
System.out.println("Enter a number please"); // get input as a string
String input2 = console.readLine(); // convert to an integer
int num2 = Integer.parseInt(input2);
int sum = num1 + num2; // get the sum of the two inputs
int difference = num1 - num2; // get the difference of the two inputs
int product = num1 * num2; // get the product of the two inputs
int average = sum / 2; // get the average of the two inputs
int abs = Math.abs(difference); // get the absolute value of the two inputs
// new section
// display the number
System.out.println("The total sum = " + sum);
System.out.println("The total difference = " + difference);
System.out.println("The total product = " + product);
System.out.println("The total average = " + average);
System.out.println("The total absolute value = " + abs);
} // if something breaks, catch the exception
catch (IOException e)
System.out.println(e); // displays the exception
System.exit(1); // quits the program
}what will be the right syntax or code to find the MAX and MIN values of two numbers a User Inputs, hope someone can help with this. thank you for your help.Thanks alot man, sheesh i do not know why my book
doesnt give me all the static methods. but i do really
appreciate your help. peaceA complete list of the java.lang.Math methods can be found at http://java.sun.com/j2se/1.4/docs/api/java/lang/Math.html
btw,
max(a, b) == (a > b) ? a : b
min(a, b) == (a < b) ? a : b
Maybe you are looking for
-
Poor performance and out of date
I'm sorry to have to say this, having been a big fan of Robohelp in the past, but Robohelp 8 is like something out of the dark ages. I last used it 2003 and it doesn't seem to have been updated since then. These are the problems I've encountered so f
-
Hi im having problems creating a Project Code Report, in one in SAP Business One is good, but i would like to see the account name beside the Account code and omitt certain codes i.e. sales etc - this i can do by the Where statement (T1.Segment_0 < [
-
Accounting entries in Vendor Rebate
What are the accounting entries in vendor rebate arrangement in complete cycle from MM to FI at the time of GR At MIRO Settlement
-
I'm trying to burn a cd from my iPod. I've created a playlist but the "burn cd" icon is not showing up anywhere on my iTunes window.
-
Graphic for macbook pro 2011?
Hi Guys:) i reacently purchased the new Macbook pro 2011 and after a while of usage i wonder if there is any way external or internal (doesn't matter) to boost your graphic preformance??