The script is now mature, if somebody is interested, I could write a document and submit it to the Author of MVDB for implementation in the official documentation.

802

(17 replies, posted in Script)

Thanks a lot for your help,

for the sake of other people willing in reproducing this item, please find below the working code:

//##################################################################################################
// Field protection and Checkbox section

// Checkbox to add "DECT" in two fields at once EditCisco Form
procedure AddInfo_CheckBox1_OnMouseUp (Sender: string; MouseLeft, MouseRight, MouseMiddle: boolean; Shift, Alt, Ctrl: boolean; X, Y: Integer);
begin
    if AddInfo.CheckBox1.Checked then
    begin
        if not AddInfo.AddTK.ReadOnly then
        begin
            AddInfo.AddTK.Text:='DECT';
            AddInfo.AddPF.Text :='DECT';
        end;
    end;
end;


// Check if fields PF is empty or not for the checkbox, if not empty then read-only AddInfo Form
procedure AddInfo_AddPF_OnChange (Sender: string);
begin
    if (AddInfo.AddTK.Text='DECT') and (AddInfo.AddPF.Text='DECT') then AddInfo.CheckBox1.Checked:=True else AddInfo.CheckBox1.Checked:=False;
end;


// Check if fields TK is empty or not for the checkbox, if not empty then read-only AddInfo Form
procedure AddInfo_AddTK_OnChange (Sender: string);
begin
    if (AddInfo.AddTK.Text='DECT') and (AddInfo.AddPF.Text='DECT') then AddInfo.CheckBox1.Checked:=True else AddInfo.CheckBox1.Checked:=False;
end;


// Protect fields PF and TK when not empty, if not empty then read-only AddInfo Form
procedure AddInfo_OnShow (Sender: string; Action: string);
begin
    if AddInfo.AddPos.Text<>'' then AddInfo.AddPos.ReadOnly := True else AddInfo.AddPos.ReadOnly := False;
    if AddInfo.AddTK.Text<>'' then AddInfo.AddTK.ReadOnly := True else AddInfo.AddTK.ReadOnly := False;
    sLastActionForm := Action; // variable for edit/add logging
end;

803

(8 replies, posted in General)

I will send you my project but without the script as I do not understand how to implement.

804

(17 replies, posted in Script)

I will send you my current project with explaination. I have anonymized the data in the db wink

805

(2 replies, posted in General)

Thanks, I cannot wait to see this bug fixed smile

806

(2 replies, posted in General)

Why are  the data wiped when we add a new table in a project after reconstructing the database? I spent a lot of time adding a new table and creating forms and SQL queries and now I have no data in the db... This is really annoying as I will have to re-import the data using an external tool.

807

(8 replies, posted in General)

I would like to learn by myself so my life would be easier afterward but still I do not understand how to implement action scripts.

It might be super easy for you but even with the new help in English, I really do not understand. Displaying a message is an easy task but here, there is an action to implement and I do not know how to manage this action.

I paste your code and changed the values to match my project but I still get an error. The explaination in the help is not clear for end-users with no developer background. The application is supposed to ease the way we create database application, but we need some basis for this kind of feature.

I do have some skills in SQL and lots of other subjects but none in Pascal, unfortunately. What should be after the next "begin"?

808

(8 replies, posted in General)

Looks nice but if I copy / paste your code in a script tab, I get an error : "BEGIN expected at 5:1"

I do not understand how to do it (feel like a noob)....

809

(8 replies, posted in General)

The problem is more complex.

If the field is blank, then it should be filled in but once it has been filled, it should switch to read only but the other fields should remain editable.

It is like write once and read many for one or two fields only.

810

(1 replies, posted in Script)

Just to draw your attention to a small bug in 1.47:

"Bring to Front" / "Send to back" functions are not working properly especially with panels (e.g: put a picture then a panel and try to bring the picture over the panel)
Moving objects with keyboard's arrows for fine positioning is not working.

Another annoying thing is that the objects are not floating, once they have been put on a layer, they remain part of this layer (e.g: put a panel and then a picture and try to move the picture)

We cannot link objects together, it may be useful for designing nice interfaces.

811

(17 replies, posted in Script)

Hi,

I would like to use a chekbox to assign a specific value in a column for the current shown record only, how to implement that?

There is no easy function associated to checkbox as it is for textbox. wink

What I would like to do for instance is: when the checkbox is ticked, it updates a value in a column. (ex: if checkbox = true then update column 'a' with value "xyz")

Any idea?

812

(8 replies, posted in General)

Hi,


is it possible (or simple) to create a specific field where you can input data only once and then this field is set to read only.

example for a corporate PBX phonebook database:

I have 2 fields which should be linked together and are unique in my Add & Edit form : Position and TK

These fields should only be filled once and never changed afterward in the Add or Edit but other fields can be edited.

See attached screenshot.

813

(3 replies, posted in General)

I am not sure to fully understand what you are looking for but you can already apply auto filter to a field which search automatically in a grid.

Add a textBox with the following properties (on the left handside) :

filter = %s%
increm. search = SearchBtt

I use it in my project to search very quickly and to look after typo as well smile

What is the correct syntax to put comments in the code? I would like to make the script easy to understand as per good practice.

It works great, thanks a lot for fast reply!

Now I will learn how to implement everything into my own db smile

Ok, great but I am not a developer as for almost all your users, how can I implement that with the employee log database?

Do you think it would be possible to capture the Windows user login to log who performed changes in the database?

Wow, it is more complex than I thought.

It works now but when I create a new record, the ID is logged as -1 instead of current ID smile

I spent some time to look how the script works, I am still struggling in logging the last 2 columns (birthdate and ID) when deleting a line. I would prefer to log all the information contained in a row, but I did not understand how to manage it.

An explanation would be more than welcome smile

Thanks a lot for super fast reply. Being very busy at the moment, I have no time to try it but I will do as soon as I have some spare time.

I quickly looked into your example and everything is based on scripts. Would it be possible to get any kind of documentation about the script features? (functions, how to use them, etc...) That would be very helpful especially if you want to sell you application to companies.

Do you think it would possible to populate an history table on action "save" or "delete"?

For example:

Each time I insert, edit or delete a record, I would like to get the modification logged with the date in a separate table when clicking on "Save" or "Delete"

822

(6 replies, posted in General)

Cool, when do you plan to implement multiple reports on same page? smile (I know, I bother you with this tongue )

823

(5 replies, posted in General)

What's new in this release?

Would it be possible to have a release note for the new versions so we could track the changes?

I think that you should not write in capital letters and give more information on what you want to do in order to get any answers.

825

(7 replies, posted in General)

A new thing with this version is that no tables are shown in the table tab when working on an existing project.

My project is working fine with all data but nothing appears in the first tab except "add a table"