Adding multiple records in a LightSwitch application
I have been requested to add a new feature to my current LightSwitch application that is used to manage our employee training programme. The problem revolves around the ability to create training needs for a multiple set of employees, instead of having
to create each training need individually. The obvious benefit being reduced input for the team leaders, who have to create them for their respective teams.
The data schema looks like this:
I have tried to implement a Many to Many Relationship (Andy Kung) but it doesn't appear to meet the requirements.
The idea is to add some Local Properties for the team leader to Select the Course, and other required fields to capture the details of the training need. Then to provide two data grids / lists, one which shows all employees reporting to the team
leader the other showing which employees have been selected for the training need. I'm thinking that this should be a list of employees that once the record is saved I'd execute some code to create new training needs for each of the selected employees.
Am I going about this in the correct way for a LightSwitch application? Any ideas would be appreciated.
It may be a problem of too many relationships. If it's a case where a Class can have multiple Employees, and an Employee can have multiple Classes, the easiest solution is to make a third table linking the two and use that table to manipulate the info.
Let's say the Class table has the following fields:
ID
ClassName
ClassLocation
ClassTime
ClassInstructor
and our Employee table has:
ID
EmployeeName
EmployeeDepartment
and whatever other fields you track on both, it doesn't really matter. These two tables should NOT have a relationship defined because many-to-many relationships aren't supported. (well, not directly, anyway.)
To create the Link table that solves the problem, simply create a new table in Lightswitch, but don't put any fields in it. (You can do that later, but working with the simplest version will show you how easy this is.) Let's call it ClassStudentLink.
ClassStudentLink only has one field, the auto-created Id field. Now, create a 1-to-many relationship to the Class table (which adds a collection of ClassStudentLinks to the Class table) and then another 1-to-many relationship to the Employee table (which
adds a collection of ClassStudentLinks to that one, too.)
Now you can create a Common Screen Set on this new link table. When you go to the Add New ClassStudentLink screen, you get two modal pickers, once for Class, and one for Employee. Pick one of each, and save, and you just enrolled an Employee in your
Class.
From the Class table's View Class screens you can now add the child Link items which point to one Student each (i.e., click Add ClassStudentLinks on the data model on the left and drag it into a group on the screen. Do the same with the ClassStudentLink
table to add the linked Employee (because there will only be one for each link) and remove all the Link table fields from the screen but the Employee Name from the child (well, grandchild) record, because that's the only one you're interested in anyway.
You can do the exact same thing for the View Employee screen now, seeing which classes each selected Employee is enrolled in by adding the Link table there, too.
To show a Class roster, start with the Link table, change its Query filter to a selected Class, then display the EmployeeNames from the linked record. To show a Class Transcript for an Employee, start with the Link table again, but set its Query
filter to a selected Employee.
What would really be nice is if you could set the Summary property of the Link table on the fly to point to a field in either of the related child tables, but I don't think it's possible. Perhaps with pre-defined Queries in the data model, one going
each way, but I think you're limited to fields in the primary table only, not a child table.
Similar Messages
-
Adding Multiple Records with Express
Hello All,
We have a CRUD application written in Express 2.0 that allows users to
enter part numbers and associated information. Our part numbers are
structured as a prefix, alpha, suffix and 'M' or 'P' number variations :
1 AB 2 P3 for example. We have provided functionality to allow the
user to enter multiple P or M variations all at once, say 1 AB 2 P1 thru
P100,
using a dialog box where they enter the starting number, ending number
and step.
The problem comes in the AddRecordsToSave method.
This method correctly builds the array of BusinessClass needed to be
passed to the Save method, however, the Save method adds only the
initial record (the one from the original Express data entry screen)
to the database.
I have traced the problem to the BusinessClient.Update method called
from
Save. I believe I am missing some query information that should be
built into
AddRecordsToSave, but I am completely unsure of how to provide this.
As you can see in the attached code, we are using the LogAttr method to
post
changes. Apparently this is not enough. What am I missing here?
The InstanceStatus key of the added records is set to ST_EMPTY by
default....
I have tried forcing this to ST_UPDATE, only to receive an error that it
should
be ST_EMPTY......?? I am confused. If anyone can shed some light on this
for me,
I would appreciate it. Thanks for any help.
Scott Guman E-mail: [email protected]
IRM Analyst II Phone: (610) 709-2144
Mack Trucks, Inc. Fax: (610) 709-4713
Allentown, PA 18105Hi There,
If attr is not specified in your LogAttr() call, the
BusinessClass
will be put in the update state but not attributes will
be logged.
That may be the reason why only the displayed record(
fetched from
the DB ) is getting logged, but not the new records.
I think you should use ATTR_SIMPLE with LogAttr. This
will cause
all the attributes to be logged and a proper query to
be built
to insert the newly created record. I am no Express
Guru,
but it works fine for me. Also, try not to modify
InstanceStatus directly.
Sometimes it might lead to inconsistencies. The online
help
The Add Records to Save example really helps.
Good luck!
Ajith Kallambella. M.
Forte Systems Engineer,
International Business Corporation
-----Original Message-----
From: Scott Guman [SMTP:[email protected]]
Sent: Wednesday, September 16, 1998 9:34 AM
To: 'Forte Users'
Subject: Adding Multiple Records with Express
Hello All,
We have a CRUD application written in Express 2.0 that
allows users to
enter part numbers and associated information. Our
part numbers are
structured as a prefix, alpha, suffix and 'M' or 'P'
number variations :
1 AB 2 P3 for example. We have provided functionality
to allow the
user to enter multiple P or M variations all at once,
say 1 AB 2 P1 thru
P100,
using a dialog box where they enter the starting
number, ending number
and step.
The problem comes in the AddRecordsToSave method.
This method correctly builds the array of BusinessClass
needed to be
passed to the Save method, however, the Save method
adds only the
initial record (the one from the original Express
data entry screen)
to the database.
I have traced the problem to the BusinessClient.Update
method called
from
Save. I believe I am missing some query information
that should be
built into
AddRecordsToSave, but I am completely unsure of how to
provide this.
As you can see in the attached code, we are using the
LogAttr method to
post
changes. Apparently this is not enough. What am I
missing here?
The InstanceStatus key of the added records is set to
ST_EMPTY by
default....
I have tried forcing this to ST_UPDATE, only to receive
an error that it
should
be ST_EMPTY......?? I am confused. If anyone can shed
some light on this
for me,
I would appreciate it. Thanks for any help.
Scott Guman E-mail:
[email protected]
IRM Analyst II Phone: (610) 709-2144
Mack Trucks, Inc. Fax: (610) 709-4713
Allentown, PA 18105
<< File: AddRecordsToSave.txt >>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
Bug report (and solution): adding multiple records through Java API in bulk
I have found some bugs in the Java API (version 4.1.25) that makes it impossible to add mulitple values in bulk to a RECNO database. The fixes are as follows:
MultipleEntry.java, line 80:
"DbUtil.int2array(curr_off, this.data, pos);"
should be replaced by
" DbUtil.int2array(recno, this.data, pos);"
MultipleRecnoDatabaseEntry.java, line 130:
"return append_internal(data, doff, dlen, recno);"
should be replaced by
"return append_internal(data, offset, len, recno);"
Regards,
Johan WaltersHello,
It looks like there were some corrections to this area in the post 4.1 i.e. 4.2 release. And I do not see these same issues in the current 5.1.25 release. If you do find them in the current release, just let us know.
Thanks,
Sandra -
Insert multiple records from web dynpro
Hi,
How to insert multiple records from web dynpro applications to SAP backend system ?
Thanks,
sowmyaHi soumya..
if want to multiple row selected then save into the Sap back End..
value node--table.
Backend value node=table_bapi_input;
back end internal table --tableback.
int size=wdcontext.nodeTable().size();
int lead=wdcontext.nodeTable().getLeadSelection();
table_bapi_input in=new table_bapi_input();
wdcontext.nodetable_bapi_input().bind(in);
for(int i=size-1;i>0;i--){
tableback set=new tableback()
if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){
set.setName(wdContext.nodeTable().getTableElementAt(i).getName();
in.addZc_input(set);
wdContext.currenttable_bapi_inputElement().modelobject().excute();
wdContext.nodeOutput().invalidate();
thanks
jati -
Retrieve multiple records of Business Object in a Application Service?
Hi,
I am working on CE71.
I want to know how to retrieve multiple records of a Business Object in a Application Service?
Regards,
RahulHi,
This can be achieved by adding find method on one or multiple attributes of the business object.
Suppose There is a customer business object with attributes (name, id , city, country ). Now you can add findByCity operation that will return all the Customer Objects which have the City = as entered by user.
Now this find operation can then be called by your application service and this list can then be returned as output of the application service.
Hope this helps,
Ashutosh -
Multiple tables with the possibility of multiple records in each table
Post Author: viper
CA Forum: .NET
Hi
I have been trying for a few days now to come up with a CR solution to displaying data from multiple tables. These tables, in some cases, have more then one record that needs to be displayed. This is basically what I am trying to do.....
I am developing a .net web application(vb) using vs2005 and an oracle 10g backend. There is a data entry part of the site that users will enter data related to a property. Other users will be able to search these records and have a list of records returned based on the search criteria. The user then can click on one of these records to view a pop up CR report containing all the data related to that one property. The PropID is passed to the pop up page and is used in the WHERE clause of my SQL statement to bring back only one property. This data can come from as many as 18 tables if all the fields have been entered for this property. I have tried many different solutions to get the data from multiple tables...and have had some that were close to what I need. The best one I have will display data from multiple tables but only one record per table.....which doesn't work in my case since some of the tables have more then one record per table.
Is there anybody that has had success in setting up similar reports?
Does anybody know how I could use the "Group Expert" to group by the tables in my application? I can only figure out how to group within a single table.
It would be great if I could group by table....then just display the record(s) in each table that had the same PropID. I am not sure if the pdf export would show all the data in that situation but it would be worth a try. If fact...maybe I could create a new table called MyTables and just add two colums like MyTableID and MyTableName. Then add all the table names to MyTables that I want to see in the report and add the associated MyTableID value to each table as a new column. I could then group by MyTableID and PropID. Just guessing here.
Any ideas would be appreciated.Post Author: quafto
CA Forum: .NET
Your query is not too clear so I'll do my best to answer it broadly.
You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
Hopefully my comments have given you a few ideas. -
Updation/insertion of multiple records simultaneously using check box
Hi,
I am using Jdev11.1.1.2.0 version. I have the following scenario.
There is a table in the view.At run time, I need to select multiple records and update those records in the database. So i took check Box as a column in the table.*(I did not associate check box to any of the attributes (columns) in the table.)* After running the application, I selected multiple records using checkbox and submitting them. The check box is returning value as 'false' even for the selected records also instead of 'true'. Because of this we are facing the issue in updating only the selected records. Please suggest your valuable inputs.
I have written the following code in the backing bean to get the selected rows.
BindingContainer bindings =BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIter= (DCIteratorBinding) bindings.get("PttDeliverabvleTrackerEOView2Iterator");
RowSetIterator depRSIter = dcIter.getRowSetIterator();
depRSIter.setRangeSize(depRSIter.getRowCount());
Integer key = depRSIter.getRowCount();
System.out.println("No of rows is "+ key);
int rowIndex =0;
for(int i =0; i<key; i++){
PttDeliverabvleTrackerEOViewRowImpl row = (PttDeliverabvleTrackerEOViewRowImpl) depRSIter.getRowAtRangeIndex(i);
System.out.println("Check box value2 "+ this.getSbc1().isSelected());
if(this.getSbc1().isSelected()){
rowIndex = i;
System.out.println("Row Index: "+ rowIndex);
Please let me know if it is it possible to associate a checkbox to any of the attributes while dragging and dropping the table in the view and update the records?
I tried selecting the option 'Row Selection' while dragging and dropping the table and changed the property RowSelection->multiple. But it is not serving the purpose of updating multiple records.
Please suggest if there is any other solution to update multiple records.
Regards,
Sreelatha.Hi,
if you added checkboxes to a table, then at runtime the checkbox is stamped, which means that a call to this.getSbc1().isSelected() just returns the state of the last checkbox that is rendered. I don't want to go into the details of ADF Faces table rendering here, but point yu to a blog article that does what you are aiming for using ADF BC: http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
Frank -
Add Multiple records to G/L account group.
Dear ABAP Experts,
i have requirement that is using BDC recording file the Functional People wants to add records to the G/L Account group. The FI consultant gave the recording file, based on the recording file i developed a BDC program. This BDC program will work for single record. After creating single record system will ask for transport request .
REPORT ZDP_ACC_GRP.
TYPES: BEGIN OF TY_TAB,
KTOPL TYPE KTOPL,
KTOKS TYPE KTOKS,
TXT30 TYPE TXT30,
VONNR TYPE VONNR,
BISNR TYPE BISNR,
TRKORR TYPE TRKORR,
END OF TY_TAB.
data: lt_tab type table of ty_tab,
wa_tab type ty_tab.
data: begin of record,
* data element: KTOPL
KTOPL_01_001(004),
* data element: KTOKS
KTOKS_01_002(004),
* data element: TXT30_077T
TXT30_01_003(030),
* data element: VONNR_077S
VONNR_01_004(010),
* data element: BISNR_077S
BISNR_01_005(010),
* data element: TRKORR
TRKORR_006(020),
end of record.
* Batchinputdata of single transaction
DATA: BDCDATA type table of BDCDATA WITH HEADER LINE.
* messages of call transaction
DATA: MESSTAB type table of BDCMSGCOLL WITH HEADER LINE.
* error session opened (' ' or 'X')
DATA: E_GROUP_OPENED.
* message texts
TABLES: T100.
data:lv_file type string.
parameters: p_fname type IBIPPARMS-PATH.
at selection-screen on value-request for p_fname.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FNAME'
IMPORTING
FILE_NAME = p_fname .
start-of-selection.
lv_file = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
* FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = LT_TAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17 .
LOop at lt_tab into wa_tab.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-TXT30(01)'.
perform bdc_field using 'BDC_OKCODE'
'=NEWL'.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-BISNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'V_T077S-KTOPL(01)'
WA_TAB-KTOPL."record-KTOPL_01_001.
perform bdc_field using 'V_T077S-KTOKS(01)'
WA_TAB-KTOKS."record-KTOKS_01_002.
perform bdc_field using 'V_T077S-TXT30(01)'
WA_TAB-TXT30."record-TXT30_01_003.
perform bdc_field using 'V_T077S-VONNR(01)'
WA_TAB-VONNR."record-VONNR_01_004.
perform bdc_field using 'V_T077S-BISNR(01)'
WA_TAB-BISNR."record-BISNR_01_005.
perform bdc_dynpro using 'SAPLSTRD' '0300'.
perform bdc_field using 'BDC_CURSOR'
'KO008-TRKORR'.
perform bdc_field using 'BDC_OKCODE'
'=LOCK'.
perform bdc_field using 'KO008-TRKORR'
WA_TAB-TRKORR."record-TRKORR_006.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-KTOPL(02)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-KTOPL(02)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_transaction using 'OBD4'.
ENDLOOP.
FORM BDC_TRANSACTION USING TCODE.
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
* batch input session
* call transaction using
REFRESH MESSTAB.
CALL TRANSACTION 'OBD4' USING BDCDATA
MODE 'A'" CTUMODE
UPDATE 'S'"CUPDATE
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
ELSE.
WRITE: / MESSTAB.
ENDIF.
ENDLOOP.
REFRESH BDCDATA.
ENDFORM.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
But the FI consultant wants to add multiple records to 'G/L account group'.After adding records before saving the system need to ask transport request at the last.
How can I write code ...??
Please help me.Hi Srikanth,
Thanks for reply,
You are right we need to load hierarchy for G/L then we can see all the G/L's for all G/L groups.
I have one more question when I check in RSA3 for the G/L account numbers, I could not find them.
I am using the datasource fi_gl_4 and in rsa3 I can see 1000 records data and when I put filter on G/L account and search for the G/L number I needed I cant see it, but it is there in the functional transaction(f.01)?
How to check for the required G/L's in rsa3 ?
Thx -
How to store multiple records for one master reocrd using sequnce
dear,
my question is in one form i have master block f and detail block.
my question is i created one sequence and assign to master table. but i dont know how to assign that sequence to multiple record in detail table for that particular master record. i got lots of answer previously but i m not getting exactly.pls tell me full procedure otherwise gv me one demo application
NOTe: the sequnce is created after master record commiting to database.
PLS pls help me
Thanks
dambyi did not get answer pls help me.
-
Insert Multiple Records and newest record id
The problem I have is I am using a somewhat normalized
database and I am trying to enter multiple records from a form into
a table called catfit. It also needs to add information to another
table called prodmat and pull the id of the record I just added to
the prodmat table and insert it into the catfit table in one shot.
Promat - Holds all of the products
columns in this table
prodid
mold
desc
features
pic
Catfit - Table that links Prodmat and Modcats
columns in this table
prodid
catid
modlid
Now the form I have
<form method="post" action="action.cfm">
<select name="modlid">
<option value ="#modlid#"
selected="selected">#modlid#</option>
<option value="1">Sewing Machines</option>
<option value="9">Vacuums</option>
<option value="12">Air Purifiers</option>
</select>
<select name="catid">
<option value ="#catid#"
selected="selected">#catid#</option>
<option value="None">None</option>
<option value="1">Sewing
Machines-Embroidery</option>
<option value="2">Sewing
Machines-Computerized</option>
<option value="3">Sewing
Machines-Professional</option>
<option value="4">Sewing
Machines-Quilting</option>
<option value="5">Sewing
Machines-Electronic</option>
<option value="6">Sewing Machines-Value
Machines</option>
<option value="7">Sewing
Machines-Sergers</option>
<option value="8">Sewing
Machines-Specialty</option>
<option value="9">Air Purifier</option>
<option value="10">Vacuums-Upright</option>
<option value="11">Vacuums-Canister</option>
<option value="12">Vacuums-Central</option>
</select>
<select name="catid">
<option value ="#catid#"
selected="selected">#catid#</option>
<option value="None">None</option>
<option value="1">Sewing
Machines-Embroidery</option>
<option value="2">Sewing
Machines-Computerized</option>
<option value="3">Sewing
Machines-Professional</option>
<option value="4">Sewing
Machines-Quilting</option>
<option value="5">Sewing
Machines-Electronic</option>
<option value="6">Sewing Machines-Value
Machines</option>
<option value="7">Sewing
Machines-Sergers</option>
<option value="8">Sewing
Machines-Specialty</option>
<option value="9">Air Purifier</option>
<option value="10">Vacuums-Upright</option>
<option value="11">Vacuums-Canister</option>
<option value="12">Vacuums-Central</option>
</select>
<select name="catid">
<option value ="#catid#"
selected="selected">#catid#</option>
<option value="None">None</option>
<option value="1">Sewing
Machines-Embroidery</option>
<option value="2">Sewing
Machines-Computerized</option>
<option value="3">Sewing
Machines-Professional</option>
<option value="4">Sewing
Machines-Quilting</option>
<option value="5">Sewing
Machines-Electronic</option>
<option value="6">Sewing Machines-Value
Machines</option>
<option value="7">Sewing
Machines-Sergers</option>
<option value="8">Sewing
Machines-Specialty</option>
<option value="9">Air Purifier</option>
<option value="10">Vacuums-Upright</option>
<option value="11">Vacuums-Canister</option>
<option value="12">Vacuums-Central</option>
</select>
<input type="text" name="modl" value="#modl#"
style="form">
<input type="text" name="pic" value="#pic#"
style="form">
<textarea name="desc" rows="25" cols="60" wrap="virtual"
value="#desc#">#desc#</textarea>
<textarea name="features" rows="25" cols="60"
wrap="virtual" value="#features#">#features#</textarea>
<input type="submit" value="Submit" style="form"
name="submit">
</form>
I have worked with the action.cfm page to no avail what so
ever so I won't even post it. Now the prodmat table is the table
where I need to get the prodid (Autonumber column) for the record
that was just inserted so I can insert that number into the catfit
table under the prodid column (number column). So this what I
hoping to get in the end.
When someone submits this form it will add the data to the
prodmat table and grab the prodid generated from the new record.
Then instert a new record for each of the catid select boxes into
the catfit table. so something like this.
If they select all three categories upon the submit it would
add to the catfit table for each record:
molid = 1
catid = 2
prodid = 16 (for instance this would be the newest record
added to the prodmat table)
molid = 1
catid = 6
prodid = 16
molid = 1
catid = 8
prodid = 16
Please help I am loosing my hair over this!Azadi Saryev wrote:
> instead of
> AND CID=#form.CDI#
> you have to use something like
> AND CID IN (<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.CDI#"
> list="yes">)
> since #form.CDI# contains a list of values, not a single
value
No. Don't do that. It would produce the same results you were
getting before ie. the values for all three records would be the
same.
Number the CDI fields just like you're doing with form.catID.
So each set of values is grouped by number
form.catId1, form.CDI1
form.catId2, form.CDI2
form.catId3, form.CDI3
Then extract the values inside your loop and use them in your
UPDATE
<cfloop index="LoopCount" from=1
to=#Val(form.locCount)#>
<cfset variables.locID= form["locID"& LoopCount] >
<cfset variables.catid = form["catid" &
LoopCount]>
<cfset variables.CDI = form["CDI" & LoopCount]>
</cfloop>
Though you may not actually need an UPDATE here. Another
option might be to do a DELETE of all existing records for a
product, followed by an INSERT. -
Inserting multiple records in JSP and setting date format
Hi,
I'm looking at the possibilities for using JSP's as a web application.
I've got a few questions about it:
1) Is it possible to insert multiple records in the detail block of my JSP. Normally when I click the 'insert button', an insert JSP comes up, which is a html form with the possiblity of inserting only one record.
2) Is it possible to change the format of a date field. Now a date field is displayed as 'YYYY-MM-DD'. My nls_date_format is something else.
3) I can't get the static combo box working for the class EditCurrentRecord. The normal use combo box is no problem. Probably, I don't have the syntax correct. Could anyone provide an example for this.2) Just use the Calendar object. You can format the date any way you want. I am assuming that you are talking about how the date appears after a .toString() call.
Here is how I do it (this code will probably look very bad I am trying to type into a very small space so bear with me):
public static String traceDate(java.sql.Timestamp dt)
try
if (dt == null)
return " ";
else
Calendar clFmt = Calendar.getInstance();
clFmt.setTime(dt);
return
String.valueOf(clFmt.get(Calendar.MONTH) + 1) + "/" +
String.valueOf(clFmt.get(Calendar.DAY_OF_MONTH)) + "/" +
String.valueOf(clFmt.get(Calendar.YEAR)) + " " +
String.valueOf( (clFmt.get(Calendar.HOUR) == 0) ? 12 : clFmt.get(Calendar.HOUR) ) + ":" +
padLt(String.valueOf(clFmt.get(Calendar.MINUTE)),2) + ":" +
padLt(String.valueOf(clFmt.get(Calendar.SECOND)),2) + " " +
(clFmt.get(Calendar.AM_PM) == Calendar.AM ? "AM" : "PM");
catch (Exception e)
throw new RuntimeException(e.getMessage());
(padLt is a custom function that just pads 0s to the left of the number) -
SAP Query using internal table because of multiple records in KONV
Hi
Im using abap code to write to an internal table, how do you get the internal table fields to show in query report.
Reason I have added abap code is I have a query for purchase order tables EKKO and EKPO. I would like to show any conditions attached to these purchase orders using EKKO-KNUMV = to KONV-KNUMV.
Prolem is KONV can have multiple records. So added code to write records from KONV to a internal table. Problem is how do I get the internal table files to show in query report. Have added fields as additional fields and included them in the field group.
In info sturcture I have defined internal table in code 'DATA' included the select in 'Record procesing'
Any help will be appreciated. ThanksYes, and the problem is that sometimes that item has two of the same conditions. One that SAP enters automatically and one that the end user enters. I want to understand how this is happening so that I can fix it.
-
hi every one
i've developed a form containing a multiple record block. i need that some functions to be done before i commit it.
1. its primary key should b auto generated, usually i handle it by selecting max value(primary key field) from data base and adding one but in this case it wont work bcoz it wont go to database before i commit it. so it wont auto generate it.
2. second problem is that there are some fields that must b filled but it should prompt the user to enter required fields when he press commit button.
thanks in anticipation
kabirHave you considered creating a sequence object for the primary key. If the datatype of the primary key is NUMBER then a sequence will auto generate the next value if you placed (:your_sequence.next_val) into the dafault value property of the text item.
The second problem can be overcome by writing a When-Validate-Item trigger whereby the user will be prompted to the item that contained the required field that was not entered. You should however note that if a coulmn in your table is of the NOT NULL type then the form default behavior is to prompt user to enter the field. -
Update Multiple records using NW CE WebDyn Pro 7.2 interface ITEMDETAILS
We are trying to use SAP Netweaver CE 7.2 and NetWeaver Design Studio 7.2 with the Web Dynpro application interfaces configured to connect to our MDM 7.1 SP06 repositories to develop web screens that allow our end users the ability to maintain MDM repository data without the use of DataManager.
Our first application was to be a simple one to show the business the benefit of SAP Netweaver. Itu2019s very easy to use the interfaces for SEARCH, RESULTSET, ITEMDETAILS, MATCH and MERGE if you plan to maintain one record at a time. We would like to update many records at the same time.
Using the configuration described previously, I find that I am able to select multiple records at one time using the RESULTSET interface and the Context folder of u201CSelectedRecordsu201D but I am not able to pass multiple records at one time to the context u201CIODatau201D used by the ITEMDETAILS interface and allow my end users to see and update multiple records at one time.
If I can pass multiple records from RESULTSET to ITEMDETAILS for display and update would you please provide me with an example of how I would do this in NetWeaver Design Studio for NW CE 7.2..
If I can NOT pass multiple records from RESULTSET to ITEMDETAILS for display and update, Would I then have to write my own wrapper application to read multiple records selected using the RESULTSET interface and the develop my own UPDATE view to display and update more than one record at a time. This would be time consuming since I would also have to write my own back out procedures and validation of update procedures that already happen within ITEMDETAILS. Do you happen to have any CE application examples that show how this is done for a NW CE MDM repository that I can see? The current documentation u201CHow to Build Web Applications Using MDM Web Dynpro Components. pdfu201D falls short in the area of updating multiple records.
Thank you in AdvanceBugs aside, if it's VERY noisy, that might just be the out-of-sync problem (something I'm very familiar with now).
Search the forum for "aggregate sync" and you should get some clues, if this is indeed the problem.
Short of it is, you need to sync the two devices together. Easiest way seems to be to connect the two devices via S/PDIF and set Clock Source to S/PDIF for the "slave" device (set in Audio Midi).
You can also just set the Clock Source as the "master" device in the drop down, bypassing the need for the S/PDIF cable altogether, but I haven't tried this myself.
Macbook Pro CD / iMac C2D Mac OS X (10.4.8) -
When doing a post to a rest service is it possible to send multiple records in json
Hi I'm trying to develop my first web service and I'm not sure I'm in the correct place. I'm using Oracle application express 4.2.2. on oracle 11g. I followed this example Creating and Using RESTful Web Service in Application Express 4.2 and used java as the client to connect to the web service. I change my employee record to have forename,surname, address1. This is working fine for me. However I need to be able to post complex multiple records to the web service in one call to the web service.
e.g. in the example it sends
{"forename","john":"surname","smith":"address1":"first address line"}
What I would like to send is something like this.
"employees" : [{"forename":"john","surname":"smith","address1":"first address line"},{"forename":"Dave","surname":"Jones","address1":"first address line"}]
Is this possible.
Thanks
Anthonyhi:
you can edit the URI template like below
promotionlist/{accnt_price_id},{addr_row_id}
then you can post multi parameters to Web Service.
Maybe you are looking for
-
Arrowheads made using Stroke panel break when backsaved as an EPS?
Hello~! So I've noticed some fundamental differences between the features that WERE available under the "Add Arrowheads" feature, and the ability to add arrowheads that is now included in the Stroke panel. Insofar as I understand, there was not a way
-
Allow Drag-and-drop Sorting of Your Music
With playlists, I love how you can drag and drop tracks to rearrange your playlist. However, I've noticed the only sortings you can have for Your Music (songs) are by the titles (track, artist, time, album, added). For Albums and Artists, the only so
-
Failed Activity Notify Requester of Confirm Receipt SSP5 - initial notice Activity Type Notice Error Name WF_ERROR Error Message [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: 2018: Unable to generate the notification XML. Caused by: 2020:
-
Übernoob question: how do I get a GUI?
First post and I'm already whining Freshly installed off the 150MB CD .iso, rebooted, woah, command line! I'm not very good with command lines, never have been. Is there any way to get a GUI? Or am I going to have to run some complicated script? All
-
Hi, Upgrading to driod 2 or Facinate,how is the call quaulity and clearity in the Fascinate? Need some real input. Thank you