Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Using dropdown
Using dropdown [message #848] Fri, 25 May 2007 08:59 Go to next message
danpoleary is currently offline  danpoleary
Messages: 49
Registered: February 2007
Member
Hello,

I have tried to find a way to get dropdown to work in multi1, and hit this snag.

I have two screens, one is of type list1 and the other of type multi1. The list1 correctly brings up a list of records. while the multi1 fails with the "Primary key (unique_sequence) is not complete - check selection" error that I had in the past. I have checked through all the code, and everything is exactly the same, except one in multi1 and the other list1.

While trying to debug, in the filelist(multi1).php file, I changed the line "require 'std.multi1.inc';" to "require 'std.list1.inc';" to math the one in filelist(list1).php. it now lists the records without error. I then change that line back, and it works, it lists the records with the dropdown list somewhat working (Will not save changes on submit).

cool I think, I am getting there. but why did it all of a sudden start to work. A little later, I had logged off, and logged back in, and yikes filelist(multi1).php gives the error again.

Any help on this would be greatly appreciated.

Dan
Re: Using dropdown [message #849 is a reply to message #848] Fri, 25 May 2007 12:56 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2369
Registered: April 2006
Location: Surrey, UK
Senior Member
You seem to be describing two problems here:
1 - you cannot navigate from the LIST1 form to the MULT1 form without getting the 'Primary key (unique_sequence) is not complete - check selection' error.
2 - the dropdown will not save changes on submit.

Problem #1 should be easy to solve. The MULTI1 form will not work unless it is passed a selection string in the format "unique_sequence='whatever'", in other words a string that provides a primary key of the table in question. Do the records in your LIST1 form have a primary key named 'unique_sequence'? Is that field included in the select list of the sql query?

Problem #2 is confusing. I have several MULTI1 forms with dropdown lists running in my development environment without any problems.

You say that you changed "require 'std.multi1.inc';" to "require 'std.list1.inc';" and it listed the records without error. Are you aware that a LIST1 form will work without selection criteria while a MULTI1 will not? You have to select one or more records in the parent form before activating the MULTI1 form with a navigation button. Also, a LIST1 form is read-only and will not allow any field to be changed. If you are running the LIST1 control script with the MULTI1 XSL stylesheet then the screen may appear to accept changes, but when you press SUBMIT there is no code inside the LIST1 script which will update the database. You cannot run controller scripts with the wrong XSL stylesheets.


Re: Using dropdown [message #850 is a reply to message #849] Fri, 25 May 2007 13:43 Go to previous messageGo to next message
danpoleary is currently offline  danpoleary
Messages: 49
Registered: February 2007
Member
Hi,

Yes, that is what I thought as well. I figured out how to get the primary key selected, but was wondering how to get a list of records updated. In my scenario, to ease the effort to update a large number of records, I wanted to use multi1 to display, lets say 10 records at a time, and allow the user to use the various dropdowns and radio buttons to change all ten records, then on submit+next, all ten get updated. Can this even be done?

In trying to reach this, I buggered up my select, causing my first two problems. I have that now working (no more key issue) but cannot find a way to allow multiple record updates on a single screen.

Thanks,

Dan
Re: Using dropdown [message #851 is a reply to message #850] Fri, 25 May 2007 14:27 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2369
Registered: April 2006
Location: Surrey, UK
Senior Member
In order to use a LIST1 and a MULTI1 you must first select the desired records in the LIST1 before pressing the navigation button to activate the MULTI1. When you have finished with the MULTI1 you return to the LIST1, step to the next page, select records, then activate the MULTI1 again.

There is no equivalent of a LIST1 screen which allows updates. There is, however, a MULTI2 which is like a LIST2 with the ability to update multiple records on a single screen.


Re: Using dropdown [message #852 is a reply to message #848] Fri, 25 May 2007 14:42 Go to previous messageGo to next message
danpoleary is currently offline  danpoleary
Messages: 49
Registered: February 2007
Member
Yes,

I have that working, but even though I select multiple records on the list1 screen, only one shows up at a time in the multi1 when I click on the button.

I tried to use multi2, but that is a 2 tier pattern. How would I use it for updating just records in the current table?

Thanks,

Dan
Re: Using dropdown [message #853 is a reply to message #852] Fri, 25 May 2007 15:19 Go to previous message
AJM is currently offline  AJM
Messages: 2369
Registered: April 2006
Location: Surrey, UK
Senior Member
That is how the MULTI1 is supposed to work. It shows one record per page, not multiple records. It is similar to UPDATE1, but has additional options.

As I said before, there is no equivalent of a LIST1 which allows updates.


Previous Topic: table related to itself
Next Topic: Customizing the SQL statement
Goto Forum:
  


Current Time: Mon Nov 25 07:52:44 EST 2024

Total time taken to generate the page: 0.07387 seconds