What's the best way to keep track movement in Form

Hi,
it’s not scriptcase that’s giving you the headache. I’m sorry to say but it is your database design that’s faulty.
You are right an auto increment field is not required as a primary key, but then it’s your problem to take care of it.
Person_id + date is NOT unique, hence the db gives you the error. Scriptcase has nothing to do with it.

Please don’t feel offended but take a pencil, a sheet of paper and a (big) eraser and start defining (exactly) what your application
should do, what data you need for it and then begin designing your database (read up on normalization).
That’s at least 75% of your application and the rest is creating the user interface and programming the logic from step 1.
This is where scriptcase shines and saves you a tremendous amount of time.

It seems to me what you are doing right now is fixing a superficial error and by doing so creating two new ones. At the end you might
get a working application by adding a workaround after workaround but if anything changes your whole system collapses like a house of cards.

As I said earlier, don’t feel offended but I strongly suggest you get your foundation (database) right otherwise people here in the forum are
having a hard time helping you over the hurdles.

jsb

Hi Jsb, Thanks for all the support and helps given.
I promise you that i will learn with a humble heart.

And hope you could continue guide me on my problem.

I don’t understand why Person_id + date is not unique? Could you explain more on this?
as i could always consider a person A on 1 SEP 2014, his marital status is ‘Single’ and 10 OCT 2014, his status could be ‘Married’

And regarding ‘normalization’, there is a purpose i design the table with redundant fields. It was trying to copy the concept from PeopleSoft, the “effective dated” concept
E.g.
Person | Effective Date | marital status | name | … any fields can modal a ‘Personality’
P001 | 1 JAN 2014 | Single | Fatimah | … other fields
P001 | 1 FEB 2014 | Single | Fatimah John … name changed and yet other fields are remain the same
P001 | 1 FEB 2014 | Married | Fatimah John … only update marital status

Correct me if i am wrong, your intention to normalize the table to reduce the redundancy?
I have adopted this concept from Peoplesoft and i found it easy when to extract data based on certain date (effective date), even with redundancy in DB. That’s the reason i keep the DB table design in such a way.

And to make me more reasonble to modal a ‘Person’, i would need to design table to hold his ‘citizenship’, ‘contact info(address)’, which similar effective date design.
That’s why as of a given time, i can write a simple SQL to pull out the person’s status.

Due to many person related tables are ‘effective dated’, so i have to have a master table which to hold ‘Person ID’ and the photo only
That’s why you can see i have my person master http://sc.astudion.com/sc8/app/VirtualDesk/PersonMaster/
and the detail apps will be hosted in ‘tab’ (Personality, Contact, etc…)

Thanks for your patient in explaining but i am so sorry bcoz i can’t spot what’s wrong with such DB design. Sorry coz my DB knowledge might not as good as yours :slight_smile:

[QUOTE=weilies;27715] It was trying to copy the concept from PeopleSoft, the “effective dated” concept
[/QUOTE]

hi weilies,
i think this is the step you are overlooking, as jsb said, do what you need, don’t copy other people concepts, plan well… believe me once he told me this and i was fighting over an idea… he told me will collapse later and it did soon :slight_smile: after-all, normalization is very important to work on base project, i changed one project over and over until i got the desired setup that can hold my scenario and that was also by jsb advise, now i am happy with less workarounds although still struggling with some issues that are logic and can be solved.

why don’t you try to explain briefly your scenario of the project, lets have a look and advise about best normalization possible, to be honest, i would like SC guys to open a section for this… many people have scenario in mind and they don’t know what is the best practice to do using scriptcase… sometimes SC does save a lot of time if you know how to use its power correctly…

one more concept i like to use from time to time, if i have powerful platform for specefic need that i can use “PHP/Open source” and flexible to use, why do i start creating new one using SC? did you try sugar crm? did you see orang hrm? those are people management stuff hold big platforms flexibility and they are open source, have a look… may save you time and give you more useful features, those people is their domain, they for sure planned the software well and added/planned for different requirements scenario :slight_smile:

Mike