Hi,
Perhaps try it something like this (see attached).
In the example, I've added a new field ('roletohide') to the _user table to hold the role that needs to be hidden rather than hard coding it in the script.
It's a bit 'basic' (I'm busy with grandchildren and Christmas for my sins  big_smile and haven't much free time at the moment) but hopefully it gives you some ideas.
The passwords for all users is 'password' apart from Admin which is 'admin'.
Regards,
Derek.

Hi,
The name of the grid is 'frmdbcoreusers.gridusers'
However, I can't find any reference to the name of the 'role' combobox on 'frmdbcoreuserform'.  I wrote a small program a while back to identify all the elements on the 'frmdbcore' suite of forms and the one element that it never found was the 'role' combobox which is puzzling.
Derek.

Hi FMR,
It's not strictly the correct way to do it ( big_smile ) but if you just want something that is quick and easy then have a look at the attachment.
Just add an empty field to your lead table and add the user name immediately prior to running your report.  Then when you close the report, remove the user name.
Valid sigin-in details are admin / admin, FMR / password, Derek / password;
Derek.

Hi Step-In,
Probably a few ways to do it.
Attached is one suggestion using a calculated field;  I've used a second tablegrid to load the consolidated (one line per driver) data before running the report rather than hijack tablegrid1 (I didn't want to mess up your layouts etc).
Select a driver using the existing combobox (combobox2) or leave the combobox blank to see all drivers.
You'll probably want to alter the layout of the concatenated field and also the report so I didn't spend any time on them - it's more just to give an idea how you could approach it.
Regards,
Derek.

105

(3 replies, posted in General)

Hi,

if form1.tablegrid1.cell[0,vi].asboolean = true  (asboolean) and also the form1.tablegrid1.cell[1,vi].asstring (asstring).

Basically, when you query the contents of an individual cell in a tablegrid, you need to specify 3 things
1.  which column the cell is located in (in your example, this is column 0)
2.  which row the cell is located in (in your example, this is the variable 'vi').
3.  what data type the cell contents contains (boolean, integer, datetime etc etc).  All cells are presented as strings in the tablegrid so, because a checkbox is a 'boolean' field, you need to specify '.asboolean' in your script if you want to perform some action on it.
Have a look at the amended example;  tick a couple of the checkboxes in the tablegrid and then click the 'all the checked' button and you can see the different data types being displayed in the 'message box' as you move through the tablegrid.
There are (as always with MVD) other ways of copying cells from the tablegrid to an edit or memo field that don't involve using the 'checkbox' - it all depends on what you are doing and how you want your application to flow.
I hope this makes things clearer.
Derek.

106

(3 replies, posted in General)

Hi,
Try it like this (see attached). 
I'm guessing that there are probably two ways you might want to see the selected rows in the memo fields (one per line or comma delimited) so both options are in the script.
Regards,
Derek.

107

(2 replies, posted in General)

Hi,
Have a look at the attached example which loads data from an external .csv, shows what rows have been matched and which have not been found and then updates those rows that match.
Maybe this can give you some ideas.
Derek.

108

(10 replies, posted in General)

Hi,
I thought that the example I sent earlier already did this.
When you have loaded your .csv file, you can click on the 'view import' button and any parts that do not exist are highlighted with a 'not found' warning.
You can simply place a button on the 'frmviewimport' form to create a new record if required.
Derek.

109

(10 replies, posted in General)

Hi,
I didn't realise that the part number could appear multiple times in your input file.
But it's a easy fix - just change the script to 'select sum(adjustment)' from .... etc etc.
Please see the amended attachment.
Derek.

110

(10 replies, posted in General)

Hi,
Perhaps you could try it something like this (see attached).
On Form1, you can
1.  manually adjust quantities by selecting a part number from the combobox, typing in an adjustment amount and the qty is updated.
2.  update adjustments in batch by uploading a CSV file.  Specifically,
2.1  click on the 'import' button to load the CSV into the 'csvimport' table.
2.2  click on the 'view import' button to review what is going to be updated - it will also show any data mismatches.
2.3  click on the '⇈' button to update the quantities in the 'tameio' table.
Maybe this gives you some ideas.
If anything is not clear, just shout.
Regards,
Derek.

Если вы не хотите писать сценарий, попробуйте использовать фильтр в своем отчете.
Это работает независимо от того, выделена ли запись в сетке таблицы или нет.
В прилагаемом примере
1. оставьте фильтр (kpadd,combobox1) пустым, чтобы отобразить все записи в отчете.
2. выберите значение фильтра, чтобы отображать только те записи, которые соответствуют.
Если вы хотите только отображать все записи и вам не требуется фильтрация, просто скройте фильтр.
Derek.

112

(10 replies, posted in General)

Hi,
I'm not entirely sure what you are wanting to do.
Perhaps you can give us some more details (ideally with an example of what should happen).
Also, I don't understand how you want Excel to work with your program.
Regards,
Derek.

Hi,
Try it like this.
Derek.

Привет Godless, Vladimir,
Если я правильно понял вопрос, чтобы удалить пустые строки в таблицах, вы можете создать два статических фильтра (по одному для каждой таблицы).
Смотрите скриншот во вложении.
С уважением,
Derek.
.
If I understood the question correctly, to remove empty rows in the tablegrids, you can create two static filters (one for each tablegrid).

Hi T,
I guess we all have our own slightly different ways of testing for duplicates.
Attached is another option (as always, I like to keep things simple and my script as small as possible).
Its down-side (albeit not a major one) is that it introduces an element of data redundancy by storing a concatenation of the particular fields that you want to perform a duplicate check against.
Anyway, maybe it can give you some ideas.
Regards,
Derek.

116

(13 replies, posted in General)

Hi StateOne,
Another slightly different approach is to use overlaid labels.
The attachment is based on elapsed time but it could just as easily be applied to any scenario such as your 'diesel tanks' example.
Maybe this gives you some more ideas.
Regards,
Derek.

117

(4 replies, posted in General)

Hi,
If you want full control, you'd be better off writing your own 'deletion' pop-up (for example, use a panel with your own message, your own buttons etc) - see attached.
Derek.

Hello All,
There is also an option to make the combobox non-searchable (no need for a script  - see the attachment (and the screen capture in the attachment)).
This fixes the problem of the combobox taking a long time to retrieve the relevant data - however, although you can still SORT the combobox, you lose the functionality of being able to SEARCH the combobox and this may be too much of a compromise.
Acknowledgement to Sparrow for the test program and data.
Derek.

119

(4 replies, posted in General)

Hi,
Try it like this (see attached).
Or you can simply use

begin
  translate('Are_you_sure_you_want_to_delete_the_record','Delete Me?');
end.

However, the text associated with buttons such as 'yes', 'no', 'ok' etc are Windows generated and should appear as per your PC's language settings;   they cannot, as I understand it, be changed directly in MVD.
Derek.

120

(11 replies, posted in General)

Hi,
I guess it's the difference between 'search' and 'filter' (without getting weighed down in semantics smile).
When I use an editcounter (which doesn't allow 'fuzzy' searching), I'm not actually using it to search for a record that I can't find - I already know the number - I'm using it to filter out all the other rows in the tablegrid that I don't want and go directly to the record rather than always scrolling up and down;  in a tablegrid with a large number of rows, it's probably the fastest way of doing it.
Typically, I use an editcounter to auto-generated invoice or order numbers.
Of course, you can always copy an editcounter into a calculated field which would allow 'fuzzy' searching if that's more applicable;  as always, it depends on the actual requirement.
Derek.

Привет,
Попробуй это.
Derek.

Привет,
Попробуйте так (хотя есть и другие способы).
Если вы используете общую процедуру (в примере она называется «buildlabel»), это означает, что одна и та же процедура запускается, если вы щелкаете по сетке с помощью мыши, если вы используете клавиатуру для прокрутки, а также когда вы закрываете Form2.
С уважением,
Derek.

123

(11 replies, posted in General)

Hi,
Works okay for me (see the attachment).
Derek.

Hi Thierry, Konstantin,

The field that stores a link to the table should be called id_<table name>

Manually adding a field to the table and calling it 'id_[tablename]' to force a relationship back to itself is very neat - and so simple (but then, everything is simple once someone first thinks of it and shows you how!).
I've added this to my list of useful tricks.
Thanks,
Derek.

125

(11 replies, posted in General)

I often do that too! big_smile
With regard to using an 'editcounter' as a filter, although it is possible, I often find it better to copy it to an edit field anyway so you can use the 'fuzzy' search (%s%) and "incremental search" options (neither of which are possible if you use the "editcounter" directly as a filter).
Regards,
Derek.