How to count subforms and add a value to a dropdown?
Hello!
I want to make a form with a subform that the user can dublicate by clicking a button (JS: ... addInstance(1);)
after he dublicates the subform serval times and entered some text in the fields i wanto to count the subforms and go in every subform to get a value from a field.
Example:
A form with a subform for Firstname and Lastname.
the user dublicates the subform 5 times and filled the fields.
now at the end i want to have a dropdown with all Lastnames from the 5 subforms.
How can i make this? I looked in serval Samples but i dont find an example for it.
Thanks for Help.
Greetings A. Peters
Hello Stefan!
Thanks for your good example. It works really good. But when i opened it in the Designer and saves it under a new Name i get some warnings is that normal?
Here a copy from the log:
Ungültiger Node-Typ: macroCache
Ungültiger Node-Typ: macroCache
PDF-Dokument generieren...
Skript fehlgeschlagen (Sprache ist javascript; Kontext ist xfa[0].form[0].form1[0].Page1Subform[0].TotalSubform[0].NameDropList[0])
Skript=var sCurValue = this.rawValue; // save current value before we clear all the items
var bResetValue = false; // true if sCurValue should remain the list's value
this.clearItems();
for (var i = 0; i < Page1Subform._NameSubform.count; i++)
var oNameSFInstance = Page1Subform.resolveNode("NameSubform[" + i + "]");
if (oNameSFInstance.FirstName.rawValue != null && oNameSFInstance.LastName.rawValue != null)
if (!bResetValue && (sCurValue == oNameSFInstance.LastName.rawValue))
bResetValue = true;
// fields have been filled
this.addItem(oNameSFInstance.FirstName.rawValue, oNameSFInstance.LastName.rawValue); // first name is the text, last name is the value
if (bResetValue)
this.rawValue = sCurValue;
Fehler: Ungültiger Abruf-Vorgang für Eigenschaft; instanceManager hat keine Eigenschaft 'count'
PDF erfolgreich generiert.
Ungültiger Node-Typ: macroCache
PDF-Dokument generieren...
Skript fehlgeschlagen (Sprache ist javascript; Kontext ist xfa[0].form[0].form1[0].Page1Subform[0].TotalSubform[0].NameDropList[0])
Skript=var sCurValue = this.rawValue; // save current value before we clear all the items
var bResetValue = false; // true if sCurValue should remain the list's value
this.clearItems();
for (var i = 0; i < Page1Subform._NameSubform.count; i++)
var oNameSFInstance = Page1Subform.resolveNode("NameSubform[" + i + "]");
if (oNameSFInstance.FirstName.rawValue != null && oNameSFInstance.LastName.rawValue != null)
if (!bResetValue && (sCurValue == oNameSFInstance.LastName.rawValue))
bResetValue = true;
// fields have been filled
this.addItem(oNameSFInstance.FirstName.rawValue, oNameSFInstance.LastName.rawValue); // first name is the text, last name is the value
if (bResetValue)
this.rawValue = sCurValue;
Fehler: Ungültiger Abruf-Vorgang für Eigenschaft; instanceManager hat keine Eigenschaft 'count'
PDF erfolgreich generiert.
Ungültiger Node-Typ: macroCache
PDF-Dokument generieren...
Skript fehlgeschlagen (Sprache ist javascript; Kontext ist xfa[0].form[0].form1[0].Page1Subform[0].TotalSubform[0].NameDropList[0])
Skript=var sCurValue = this.rawValue; // save current value before we clear all the items
var bResetValue = false; // true if sCurValue should remain the list's value
this.clearItems();
for (var i = 0; i < Page1Subform._NameSubform.count; i++)
var oNameSFInstance = Page1Subform.resolveNode("NameSubform[" + i + "]");
if (oNameSFInstance.FirstName.rawValue != null && oNameSFInstance.LastName.rawValue != null)
if (!bResetValue && (sCurValue == oNameSFInstance.LastName.rawValue))
bResetValue = true;
// fields have been filled
this.addItem(oNameSFInstance.FirstName.rawValue, oNameSFInstance.LastName.rawValue); // first name is the text, last name is the value
if (bResetValue)
this.rawValue = sCurValue;
Fehler: Ungültiger Abruf-Vorgang für Eigenschaft; instanceManager hat keine Eigenschaft 'count'
PDF erfolgreich generiert.
7 Warnungen/Fehler gemeldet.
Similar Messages
-
How can i copy and referencing the value of a sub-total of a category into another cell?
How can i copy and referencing the value of a sub-total of a category into another cell?
Cells in Category rows 'exist' only when those categories are inserted using the Reorganize table. Those cells cannot be referenced from other cells.
If you want a category summed, you will need to do that in a cell that is still visible when the table is not sorted into categorie using the Reorganize pane. The function to use is SUMIF. You can find information regarding SUMIF (and SUMIFS) in the iWork Formulas and Functions User Gude. The guide may be downloaded using the link in the Help menu in Numbers '09.
Regards,
Barry -
I deleted all the music on my iPhone, but all the album artwork still exist. How do I clear and add a fresh batch of music? Also my iTunes no longer recognizes my iPhone under the "devices" tab so I am unable to manually sync. I have disconnected it makes a beep sound when reconnected so I know my computer is finding the phone, the iPhone also appears on Explorer. Stupid question but I can't figure it out and wasting too much time. Thank you.
It has always been very basic to always maintain a backup copy of your computer for this very occasion. Use your backup copy of your computer to put everything on the new one.
If for some reason you have failed to backup, big mistake, then you can transfer itunes purchases from the iphone to the computer: File>Transfer Purchases
You may be able to buy a 3rd party program to get any other music off of the iphone ( not supported by Apple).
When you sync the iphone, it will erase the current content and replace with content form the new computer.
"Not happy with itunes right now, more then a bit of a joke"
Not itunes fault that you did not do the very basics and maintain a backup copy. -
How to retrieve start and end date values from sharepoint 2013
Hi,
How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
Thanks
Gowri BalaguruHi Srini
Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
Thanks
Tripple k -
How to get parameter and add it to hyperlink using struts tag?
Hi everyone:
There is a.jsp pass a parameter to b.jsp.How to get the parameter in b.jsp using struts Tag?I also want to add the parameter to a hyperlink in b.jsp.For example in b.jsp <html:link forward=.....>cxxxx</html:link>.How to add the parameter(get from a.jsp) to cXXXX in b.jsp?Try this:
Copy A Request Parameter - You can create a new bean containing the value of a parameter included in this request. If no parameter of the specified name was included, a request time exception will be thrown - therefore, it is common to nest the use of this tag inside a <logic:present parameter="xxx"> tag to ensure that the parameter was really included. If there is the possibility that more than one parameter of the same name was included, specify the "multiple" attribute (and the resulting value bean will be an array of String values, instead of a single String).
<bean:parameter id="name" name="name"/>
And then just use <html:link> with paramId. No java code at all. -
How to keep Opacity and Blending Mode values
Hi!
I'm working with shades/highlights and since I have to make many shapes with the same values of color, opacity, blending mode, I wonder how can I make it to keep them configured, so I dont have to go to each path and change the values every time. The only value that stays is the color, but for example, the opacity changes everytime I start a new shape with the pen tool, and as I said, I'm working with shadings for a portrait, so I have to make lots of shapes with the same characteristics. Does somebody know a way to set these values and keep them "by default" so to say??
Thanks in advance.Thank you, it's just what I was looking for!
-
How Stuck Thread Timeout and JTA timeout values are related.
Hi All,
Can some one help me in understanding the the relation between Stuck Thread Time out and JTA timeout values.
Thanks,
VardhanHi,
Both are totally different in this case.
Stuck thread timeout is specific to weblogic monitoring guide line which inform you how long every thread is in process continuously by default it would 600 sec if any thread is taken more than 600 sec to finish off its work then weblogic will throw an error message that specific thread took more than 600 seconds.
Note: Mostly of the time these stuck thread are not really an issue
Where are JTA timeout on global side is specific to your every transaction either from EJB or JMS or JDBC transaction.
This timeout will rule on every individual.
Hope you got address your query.
Regards,
Kal -
How to catch Find and add event of toolbar in UDO addon ?
Hi experts ,
please help me anyone How can i catch Find and add event of SAP toolbar in my UDO addon ?
thanks in advance
SurajitHi,
Try This.....
'In Menu Event
If pVal.MenuUID = "1281" And pVal.BeforeAction = True Then 'Find
sbo_application.Messagebox("Find Mode")
end if
If pVal.MenuUID = "1282" And pVal.BeforeAction = True Then 'Add
sbo_application.Messagebox("Add Mode")
end if
Thanks
Shafi -
ALV Report how to display from and to date values in the header.
I develoeped alv report . i want to display selection screen from and to date values in top of page...
any sample code pls guide me..You have to do many things...
first find the selection details using the FM.
RS_REFRESH_FROM_SELECTOPTIONS
use the Blog to Align/populate the Header from the selection table
/people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid -
How do I view and add photos on the mobile app?
QuestionHow do I view my photos and add new photos on the mobile app?
Answer
To view your photos, you may either select the Photos icon from the Home screen:
Or, you may select the Profile icon from the Home screen.
From your profile picture, you can start scrolling to view your photos one by one. Or, touch the camera icon on your profile picture to view all your photos at once.
To add new photos to your account, touch the camera icon on the top-right corner of your Photos page:http://support.apple.com/kb/DL1455?viewlocale=en_US&locale=en_US
-
How to change country and add credit card details
Hi
I'm unable to change my itunes store account permanently. I can change my store from "UK" to "UAE" and then the store I'm in is the UAE's, however when I then go to the top left, choose account to try and add my cc details the country still shows UK. I then go back to Account info where I'm offered the chance to chanage my country, I then change it to "UAE" and am brought back to the iTunes home page, now again in the correct country. However when I go back to the account to once again try and add my cc details the country shows as "UK".
I have successfully changed the country through the Apple website and so my Apple ID has the correct address associated with it, but not so when I try to log into it in iTunes.
Grateful for any help.Problem fixed - once I changed the country to UAE and was brought back to what looked like a home page for iTunes UAE offering to set up an ID however once I followed the screens and agreed to the terms (all in Arabic - I couldn't find a way to show English) I was then brought to the screen for adding CC details but this time my country was listed as UAE.
-
How to Get ZERO and Non-ZERO Values in rowcount using Group by?
Dear All,
How can I get Non-ZERO and ZERO row count values in SQL using Group by? I can get non-zero values but when I want NULL should be returned to non-zero values it is ignoring ZERO values in output?
Any hint?
Thanks
GQHi,
Something like
select count(case col
when 0
then 1
end) zero_count,
count(case nvl(col,1)
when 0
then null
else 1
end) nonzero_countRegards
Peter -
T-SQL how to count holidays and exclude it in my scenario
Hi team,
My customer will submit a ticket to our system and it valid for 7 days. For example, if customer A submit a ticket on 2015/1/15, the request will be ineffective at 2015/1/22. So, I can directly use the following
T-SQL code to update the ticket status:
update customer_ticket set ticket_status="Cancle"
where ticket_submit_time < getdate() - 7
But, if 2015/1/19,2015/1/20,2015/1/21 are holidays, the ticket valid time should extend 3 days, it means the ticket of customer A will be ineffective at 2015/1/25. How can I count the holidays and then extend the valid time of ticket automatically?
I have a table to store our holidays, here are the sample data:
CREATE TABLE QC_OVERTIME_SCHEDULE
SCHEDULE_DATE DATE,
IS_INCLUDED VARCHAR(10),
UPDATE_TIME DATE,
MEMO VARCHAR(250)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] ([SCHEDULE_DATE], [IS_INCLUDED], [UPDATE_TIME], [MEMO]) VALUES (CAST(N'2015-01-19' AS Date), N'0', CAST(N'2015-01-15' AS Date), N'Holiday')
INSERT [dbo].[QC_OVERTIME_SCHEDULE] ([SCHEDULE_DATE], [IS_INCLUDED], [UPDATE_TIME], [MEMO]) VALUES (CAST(N'2015-01-20' AS Date), N'0', CAST(N'2015-01-15' AS Date), N'Holiday')
INSERT [dbo].[QC_OVERTIME_SCHEDULE] ([SCHEDULE_DATE], [IS_INCLUDED], [UPDATE_TIME], [MEMO]) VALUES (CAST(N'2015-01-21' AS Date), N'0', CAST(N'2015-01-15' AS Date), N'Holiday')
Please let me know if you have any ideas, thanks!
Serena,Hi Serana,
You may reference the below as well. The expiring date of each ticket can be calculated based on the calendar table and the tickets whose expiring date >= GETDATE() will be updated as 'Cancle'.
CREATE TABLE QC_OVERTIME_SCHEDULE
SCHEDULE_DATE DATE,
UPDATE_TIME DATE,
IsWorkday BIT
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150109' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150110' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150111' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150112' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150113' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150114' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150115' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150116' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150117' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150118' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150119' AS Date), CAST(N'20150115' AS Date), 1)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150120' AS Date), CAST(N'20150115' AS Date), 1)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150121' AS Date), CAST(N'20150115' AS Date), 1)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150122' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150123' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150124' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150125' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150126' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150127' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150128' AS Date), CAST(N'20150115' AS Date), 0)
INSERT [dbo].[QC_OVERTIME_SCHEDULE] VALUES (CAST(N'20150129' AS Date), CAST(N'20150115' AS Date), 0)
--DROP TABLE QC_OVERTIME_SCHEDULE,customer_ticket
CREATE TABLE customer_ticket
(id INT,
ticket_submit_time DATE,
status_change_date DATE,
ticket_status VARCHAR(10));
INSERT INTO customer_ticket VALUES (1,'20150109',NULL,'Open');
INSERT INTO customer_ticket VALUES (1,'20150115',NULL,'Open');
INSERT INTO customer_ticket VALUES (1,'20150118',NULL,'''Open');
INSERT INTO customer_ticket VALUES (1,'20150122',NULL,'Open');
SELECT * FROM [QC_OVERTIME_SCHEDULE]
SELECT * FROM customer_ticket
;WITH cte AS
SELECT c.id, c.ticket_submit_time, c.status_change_date,c.ticket_status, t.SCHEDULE_DATE AS expireDate FROM customer_ticket c
CROSS APPLY
(SELECT SCHEDULE_DATE FROM (SELECT SCHEDULE_DATE,ROW_NUMBER() OVER(ORDER BY SCHEDULE_DATE) as rn FROM QC_OVERTIME_SCHEDULE WHERE SCHEDULE_DATE>=C.ticket_submit_time AND IsWorkday=0) as tb WHERE RN=8 ) AS t
UPDATE cte SET status_change_date=GETDATE(),ticket_status='Cancle'
WHERE expireDate<=GETDATE()
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
How does one label and add description to multiple photos?
How does one add label and description to multiple photos in one action as one could do in iPhoto?
Bob WinesThis link asks the same question, https://discussions.apple.com/thread/6994338?searchText=How%20do%20I%20add%20a%2 0description%20to%20multiple%20photos?
Someone shows the method to use AppleScript/ Automator to make Photos add the same description to multiple photos. I just opened up AppleScript editor and poked around the Dictionary for Photos and saw we have access to GPS longitude,latitude and altitude. So by using a third party app/web page to get those values, an Apple Script could be used to batch add the info to selected photos. That being said, I'm really busy these days and lack time to write scripts and migrate to photos. -
How to hide RTPs and Specify Fix value for them
Hi All,
I created a business in which i am using one variable of String type with RTP enabled.
Now i don't want my user to enter this value while executing business rule, instead i want to provide a fix/constant value for that variable. How can i do that.
Basically my intention is to put that business rule inside a rule twice with 2 diff valuesHave you tried setting the variable as a member type, applying it against a dimension and then giving it a default value.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
Tricky question re 2 macbook pros sharing/importing to NASand sharing libra
Ok here's the difficulty I'm having. Data management.... Bought a Drobo FS to help solve image storage needs. Have imported 3 years worth of images in folders by dat (ex 2010-10-01). Is there a way for Aperture to "Add/Import" ALL of these folders AN
-
Urgent:Regarding data reconsilation
HI all, 1. i have PSFT as trusted source and EBS as target source. now when we connect to this sources by using out-of-the-box connectors which is already avilable,what it will ask while installing connectors and which tables it is going to connect?
-
Hi there, I know there is no official support for Android in Single Edition, but, once you have installed Indesing CC and App Builder in a mac, and you create app from your Folio menu, is it possible to create then an Android/Kindle apk app for publi
-
VNic Mac addresses not associated correctly when installing OVM Server
We are trying to get our first Oracle VM environment running and noticed that on the UCS the mac assocated with eth0 ended with 0B but on the Oracle install the eth0 interface mac address ends with 08. The mac for eth3 on the Oracle install lines u
-
Photoshop button not working inside of target?
I'm operating OSX Snow Leopard and the latest edition of Muse 2.2. However, I was having these issues with the version before 2.2 as well. I created a simple photoshop file containing 2 states Normal and Over. When I place as photoshop button outside