Formula that checks drop down list and then sums
I have a table with a drop down list with two values: '$' and 'Hr' (cell called 'PType'). There is a cell called 'Proposed' that contains numerical data. The table is dynamic and can have more cells inserted via a button within the row. I have a totals section that I want to total the SUM of 'Proposed' if the value in 'PType' is '$'. I can't figure out what type of statement will allow me to write this.
For now, my solution has been a hidden column whose cell simply states:
if (PType == "$") then
Proposed
endif
Then, in the totals section, I sum this hidden column since a value outside of '$' returns a '0' and won't affect my SUM.
I am looking for a formula I can write that does this within the totals cell instead of having two cells.
Thanks,
Mallard27
Here's my take on it.
// form1.page1.subform1.table.footer.SUM::calculate - (JavaScript, client)
var total = 0;
for (i=0; i < form1.page1.subform1.table._row.count; i++) {
if (table.resolveNode("row[" + i + "].Proposed").rawValue) {
if (table.resolveNode("row[" + i + "].PType").rawValue == "$") {
total = total + parseFloat(table.resolveNode("row[" + i + "].Proposed").rawValue);
this.rawValue = parseFloat(total);
Steve
Similar Messages
-
Creating a drop down list and linking it to Excel files
How to create a drop down list and when i select any row in the dropdown list, it must open designated MS- Excel file? Can anyone help me in this with an example code?
Thanks
AnuTry this in 7.0 format.
Attachments:
Listbox for excel files.vi 15 KB -
Drop Down Lists, and other Problems after upgrade
Noticed the problem on http://www.autotrader.com/cars-for-sale/?expandAllOptions=true&Log=0
Drop down lists do not respond they way they did last week - before 36.0.1 upgrade.
Choose a brand, and then you are supposed to be able to select from a list of models. Not happening.
I have several of the privacy add-ons (see below) but they have not changed with the upgrade (unless they too were upgraded automatically.)
FF is becoming less and less of a joy to use as the years go by.Note that your System Details list shows that you have a user.js file in the profile folder to initialize prefs each time Firefox starts.
The user.js file is only present if you or other software has created this file and normally it wouldn't be there.
You can check its content with a plain text editor (right-click: "Open with"; do not double-click).
The user.js file is read each time Firefox is started and initializes preferences to the value specified in this file, so preferences set via user.js can only be changed temporarily for the current session.
You can delete the user.js file if you didn't create this file yourself.
You can use this button to go to the currently used Firefox profile folder:
*Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
*http://kb.mozillazine.org/Profile_folder_-_Firefox
Windows hides some file extensions by default.
Among them are .html and .ini and .js and .txt, so you may only see file name without file extension.
You can see the real file type (file extension) in the properties of the file via the right-click context menu in Windows Explorer.
See also:
*http://kb.mozillazine.org/Preferences_not_saved -
Drop down lists and email buttons
I am creating a form and I have about twenty items in a drop down list. I was wondering if and how I can set it so each item selected will cause an email button I have to change address. i.e item 1 sets the email button to [email protected] and item 2 sets the button to [email protected] I think it has something to do with binding but I only have basic training so I am lost. Any help that you can give will be greatly appreciated . Thank you in advance
As mentioned, you can´t do that in InDesign but fortunately it´s fairly easy task to do in Acrobat Professional. You didn´t mention what are you sending, just an empty email that sender can fill in email client, whole PDF as attachment or some form data from PDF... all those options are possible by few lines of javascript in Acrobat side.
I made you a quick sample which just opens up an email client, populates email address based on choise that user has made in combobox and some custom subject and body meassage text. You can find it from my dropbox: https://dl.dropbox.com/u/17227987/sampleform.pdf
There´s only two formfields in that PDF; combobox for choosing email recipient (AA = [email protected], BB = [email protected] etc) and submit button. Check javascript code from
-combobox´s properties > Validate tab and
-button´s properties > Actions > Run a javascript.
In combobox, small javascript sets the myemail variable´s value based on the choise user makes. In Button there´s small javascript that triggers the email client and uses the value of myemail variable as a target email address.
ps. this sample probably works only in Acrobat and Adobe Reader. I have no idea how for instance MacOS Preview supports PDF javascript, probably not very well....=) -
Drop Down Lists and Value Change Events
I have 4 drop down lists each with a set of values from the database.
Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
I have a Submit button which takes values from these 4 lists and puts it in the database.
Problem:
I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
I tried to recreate this case in a Sandbox without a database , Here is the code:
Page1.jsp
<h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}" onchange="this.form.submit();" >
<f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
</h:selectOneMenu>
<h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >
<f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
</h:selectOneMenu>
<h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
<h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
public SessionBean1() {
list1.add(new SelectItem("0","0"));
list1.add(new SelectItem("1","1"));
list1.add(new SelectItem("2","2"));
list1.add(new SelectItem("3","3"));
list2.add(new SelectItem("a","a"));
list2.add(new SelectItem("b","b"));
list2.add(new SelectItem("c","c"));
list2.add(new SelectItem("d","d"));
map.put("0", "a");
map.put("1", "b");
map.put("2", "c");
map.put("3", "d");
private void fetch_data(String value){
selectedList2=map.get(value);
public void list1ValueChangeListener(ValueChangeEvent vce){
fetch_data(vce.getNewValue().toString());
public void addActionListener(ActionEvent event){
result=selectedList2;
}I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
With this sand box project I cannot even get the second list to show the corresponding value.
Any insight on this would be helpfulThank You Balus C,
I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
putting it as a reference here.
One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
Thanks Again -
How to use multiple drop down lists and do not allow duplicates.
I am creating a roster that has multiple positions on multiple pages. I have a drop-down list that is populated with all of the employees and want to make sure that the same employee cannot be selected for multiple posts. Ideally, when one is selected in a position, that person would not be an option in the other drop-down lists. Also, when the form is published, the end user will not use the drop-down lists in order. I have found script to remove selected items, but it only works when the user makes selections in order (List1, List2, List3 etc).
First time posting, any help would be appreciated.Look into the ring control. It behaves a lot like an enum, but you can dynamically set its contents and values associated with those contents.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Is there a way to restore the search bar from version 33?
I like seeing which search engine I have selected and the ability to change it with a drop down list BEFORE I highlight text, right-click, and select ' Search Google for "xxxx" '
Any way to roll back this latest "improvement"?If you miss being able to switch search engines without going
crazy with menus, try this out;
'''[https://addons.mozilla.org/en-US/firefox/addon/context-search/ Context Search]''' {web link}
Expands the context menu's 'Search for' item into a list of
installed search engines, allowing you to choose the engine
you want to use for each search. -
How can I select from drop-down list and jumping to selected subform?
I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
drop-down list...A (jump to subform1)
B (jump to subform2)
C (jump to subform3)
subform1
subform2
subform3
....end of formHi,
you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
From a dropdowns exit event the script will look this way:
switch (this.rawValue) {
case "A" : xfa.host.setFocus("form1.page2.field1"); break;
case "B" : xfa.host.setFocus("form1.page2.field1"); break; -
Hi,
I created a PDF form where I have open, next, previous buttons, and I'm able to connect to the access database, and it's working fine. Now, I want to be able to search by last name from the access database, and retrieve the results in a dropdown field, and then once i select the records in the drop downlist, i want to press a button to display the record. I have multiple records with the same last name. Please help, I searched the internet for hours, and can't find something similar. Your help is appreciated, and sample code is appreciated.<%
int count = 0;
while (rs1.next()){ %>
<%if (count ==0)
{%>
<option value="<%=inputorthodon%>" selected >
<%=rs1.getString("ortho_name")%></option>
<%}
else{%>
<option value="<%=inputorthodon%>">
<%=rs1.getString("ortho_name")%></option>
<%}
++count;} %>
</select>
U may have to format this a bit. The idea is to use a count variable to put "selected" in only the first OPTION. After that, we don't have to.
Hope this helps. -
How to get Date value from database and display them in a drop down list?
Hello.
In my Customers table, I have a column with Date data type. I want to create a form in JSP, where visitors can filter Customers list by year and month.
All I know is this piece of SQL that is convert the date to the dd-mm-yyyy format:
SELECT TO_CHAR(reg_date,'dd-mm-yyyy') from CustomersAny ideas of how this filtering possible? In my effort not to sound like a newbie wanting to be spoonfed, you can provide me link to external notes and resources, I'll really appreciate it.
Thanks,
Rightbrainer.Hi
What part is your biggest problem?? I am not experienced in getting data out of a database, but the way to get a variable amount of data to show in a drop down menu, i have just messed around with for some time and heres how i solved it... In my app, what i needed was, a initial empty drop down list, and then using input from a text-field, users could add elements to a Vector that was passed to a JComboBox. Heres how.
package jcombobox;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;
import javax.swing.*;
public class Main extends JApplet implements ActionListener {
private Vector<SomeClass> list = new Vector<SomeClass>();
private JComboBox dropDownList = new JComboBox(list);
private JButton addButton = new JButton("add");
private JButton remove = new JButton("remove");
private JTextField input = new JTextField(10);
private JPanel buttons = new JPanel();
public Main() {
addButton.addActionListener(this);
remove.addActionListener(this);
input.addActionListener(this);
buttons.setLayout(new FlowLayout());
buttons.add(addButton);
buttons.add(remove);
add(dropDownList, "North");
add(input, "Center");
add(buttons, "South");
public void actionPerformed(ActionEvent e) {
if (e.getSource() == addButton) {
list.addElement(new SomeClass(input.getText()));
input.setText("");
} else if (e.getSource() == remove) {
int selected = dropDownList.getSelectedIndex();
dropDownList.removeItemAt(selected);
public void init(String[] args) {
setSize(400,300);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(new Main());
}And that "SomeClass" is show here
package jcombobox;
public class SomeClass {
private String text;
public SomeClass(String input) {
text = input;
public String toString() {
return text;
}One of the things i struggled a lot with was to get the dropdown menu to show some usefull result. If the list just contains class references it will show the memory code that points to that class. Thats where the toString cones in handy. But it took me some time to figure that one out, a laugh here is welcome as it should have been obvious :-)
When the app is as simple as this one, using a <String> vector would have been easier, but this is just to demonstrate how to place classes in a vector and get some usefull info out of it, hope this answered some of your question :-)
The layout might have been easier to write, than using the toppanel created by the JApplet and then the two additional JPanels, but it was just a small app brewed together in 15 minutes. Please comments on my faults, so that i can learn of it.
If you need any of the code specified more, please let me know. Ill be glad to, -
I am trying to achieve the effect on this website
http://www.thedesignersrepublic.com/
if you click on WORK on the right to display the drop down
list and then click one of the options, you will see a list of sub
headings appear.....any ideas of an extension in dreamweaver that
will do this??cheersHere are some for how to do it in HTML and CSS -
Check the uberlink and MacFly tutorials at PVII
http://www.projectseven.com/)
and the Navbar tutorial/articles at Thierry's place
http://tjkdesign.com/articles/dropdown/)
Or this one (more recent article):
http://tjkdesign.com/articles/Pure_CSS_Dropdown_Menus.asp)
Or to get it done fast, go here -
http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"namtax" <[email protected]> wrote in
message
news:ei5rsd$5qs$[email protected]..
> any idea of tutorials on how to do that??
>
> cheers -
Sort worflows in drop down lists
Is it possible to sort workflows in shown in the down list in the sidekick ? Is there a property like the ranking property for templates ?
Yes, there is ranking property in template https://dev.day.com/docs/en/cq/current/developing/templates.html#Properties and Child Nodes of a Template
To display workflow list sorted you have to customize the drop down list and then sort it. -
Dear All,
I created a text field in my project (Light switch 201, C#), this text field has a static list which I filled manually. when I click in this text box I get a dropp down list which allow me to chose only one value from it.
Now what I want to do is to add a check box in this drop down list and allow mulity selection from this list. My list looks as follow:
Can anyone help me :) ?
Thanks all,
ZayedSomething like this:
http://www.codeproject.com/Tips/452756/Add-checkbox-inside-combobox-in-Silverlight -
Excel Cells that are 'Pick from drop down list" could not be read through ADODB.recodset
Dim ExcelConn As ADODB.Connection
Dim ExcelRs As ADODB.Recordset
Dim iidx As Integer
Set ExcelConn = CreateObject("ADODB.Connection")
ExcelConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\RRAJENDRAN\Desktop\Final Report Template.xls; Extended Properties=""Excel 8.0;HDR=YES;"""
ExcelConn.Open
iidx = 2
Set ExcelRs = CreateObject("ADODB.Recordset")
ExcelRs.Open "Select * FROM [Input$]", ExcelConn, 1, 3
Do While Not ExcelRs.EOF
Select Case iidx
Case 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
Debug.Print iidx & ":" & ExcelRs.Fields(18).Value
End Select
ExcelRs.MoveNext
iidx = iidx + 1
Loop
ExcelRs.Close
ExcelConn.Close
The blank values correspond to cells that are drop -down lists
8:
9:8/11/2014
10:8/14/2014
11:8/15/2014
12:
13:
14:
15:
16:
17:
18:
19:
Raju RajendranHi Raju,
Base on my test in excel 2013, it works fine.
Create a new excel file and save as xls
Add data (data validation for dropdownlist)
What’s the version of your excel? Could you reproduce that issue in a new file? You may share the sample file on the OneDrive.
Regards
Starain
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. -
Drop-down lists, scrolling and IE 7 issue?
I was using Captivate 3 prior to my work upgrading to
Internet Explorer 7 and had no issues with capturing scrolling
within a webpage and chosing an option on a drop-down list. I just
recently started working on a new project and using IE 7.
I went through my steps on using a drop-down list and
scrolling through it to find an option. However, when I went in to
edit the demonstration, the slide that showed the "selection" put
the correct selection in the caption - however, the slide
background image had somehow reverted the drop-down list to the top
of the list rather than in the middle where the selection would
have taken place.
Has anyone else seen this?
I went back did the same steps - but this time, I made sure
to take an extra shot prior to clicking the option - so I had the
correct screen showing for the lesson.
Anyone else have any other issues going on with IE 7 and
Captivate 3 that I should be aware of?
Thanks.I have only been using Captivate for about a month now, but
that is how it has always behaved for me...When you click and drag
it starts the "Full Motion Recording". I have had mixed results
with full motion so far. Scrolling up and down and zooming in and
out of a page have been problematic. You can change these options,
or turn off the full motion all together.
Edit--Preferences--Recording--Full Motion Recording.
BTW, I am using IE7 on a Vista machine so I cannot speak to
the functionality prior to IE7.
Maybe you are looking for
-
Can anyone provide help? Thanks.
-
I recently updated? to Lion from 10.6.8(snow leopard), and things seem to be running slower. Has anyone had similar problems? I have Feb 2011 Macbook pro 13" 2.3 Ghz.
-
Music on iphone not in library
Can't find how to sync music that already exists on phone but isn't on my music library...help
-
How to write a script to cycle through a list of search terms and download PDF files
I need to download ~2500 PDF files. Each one is accessible by entering a search term on a website and clicking a link in the search result to download the PDF. How can I create an automated process to do the following? (1) select the first search ter
-
Team Portal - I just upgraded my application from Sp1 to Sp2 (basically right click on application and select Install -> Update Portal Libraries). Do I need to do anything to the domain, or just rebuild and redeploy the ear file? Thanks Regards, Neer