How get Zabbix status flag for "calculated" field item? - zabbix

How get value of flag "The item is not discovered anymore and will be deleted" in lld item?
Need it to replace item value to "0".

That 'flag' is not item data, so it cannot be calculated. May as well just manually delete it. The underlying issue (why has the item disappeared?) may be something to shift focus to.

Related

Yii2 kartik\select2 do not show selected value in list

How can I set a value to a Select2-Widget which is not in dropdown list? I load values from other table - but it is possible to deactivate entries there, they are not shown in list then. The problem is, that the value, which is not in list is not shown correctly, because the list does not know the item.
Is it possible to show (and on update save) the old value, but it should not be possible to select it from list again.

I am trying to get Access to do specific tasks

I am using Access 2016, and here is my Access form:
When a new record is created, I need the user to click whether or not the clinical case is true. Moreover, I need the true/false options to be unmodifiable upon clicking and either a trueCase or falseCase instance is created. "True" and "False" will generate the values 1 and 2, respectively, and be stored in the statusTrueFalse field of my Cases table. I don't have any idea of how to proceed from there and would greatly appreciate the community's feedback/hints.
Here is my relationship diagram:
If true, I would like to have the open date/close date and reason closed fields appear. Thank you for your help!
You could change the subform to a list box control with a row source equal to the original subform query.
You could then add macros to the AfterUpdate() event of the list box to show your True/False command buttons (Visible=True) when the user selects a row in the list box. Then add OnClick() events to the command buttons to make them visible=false so they can only choose once.
Add any processing routines to the OnClick() event needed to capture the True vs. False values and store them in your table. You should be able to reference the list box control in your macro/code to choose the correct row in your table to update, or grab other information from the list box to generate a new record.
You might want to add a requery method to the command buttons OnClick() events to also filter any records that have already been answered true/false in the list box to avoid someone re-selecting a row they already answered and adding another True/False record.
Edit: AFAIK Access can't determine which row is selected in a subform, which is why I suggested using a list box instead.
Edit 2 (sorry): I missed your last question. You can have the date fields and reason for closure fields work the same way as your true/false command buttons. Make them visible=false by default and in the OnClick() event for the True command button, set those fields to visible=true, pause your code to wait for entries, then trigger off of another command button or AfterUpdate() event of the last field in your tab order to add the data to your table. Let me know if you need further explanation, I just finished a similar application.

access vba requery oddness

It's been awhile since i've worked in VBA. I have a bound form. It has two drop down lists. One list is bound the other not (the first ddl is a list of values. The second gets refreshed when the first one changes, using the value of the first to create a query for the second. That value is used as a fk in the table the form is bound too).
Anyway, when the form is first run and uses the default value for ddl 1, if the second combobox is empty, and I try to get the value, it's null, which is what you would expect. But, I have code that runs when ddl1's value changes, to requery ddl2. When it requeries, if the list is empty, and I do combobox1.value, instead of being null, the value is 1. This is confusing, because, since the list is empty, I would think it should be null. What's going on here? Here is what I have:
Combo1 is bound to a table
Combo 2 uses this query:
SELECT tbl_office.id, tbl_office.office_name
FROM tbl_office
WHERE (((tbl_office.otherTable_id)=[Forms]![dlg_addDivision].[Combo1]));
On Combo1 afterUpdate event:
me.Combo2.requery
So, after combo1 afterUpdate, the above sql gets called. If this produces an empty dataset, and I try to get the value of combo2, even though the list is empty, the value says it's 1
thanks
The requery requeries the List - not the value. The value stays whatever it is/was before. Its not a bug - its a feature ;-)
If you page through datasets that are already filled you wouldn't want them to be changed without user interaction. The List is just a helper for dataEntry (and validation - if you check "only listitems allowed") - but it has nothing to do with your dataset.
By setting the value to your first Entry like you proposed: Me.Combo2.Value = Me.Combo2.ItemData(0) you change the dataset intentionally. And that is how it is supposed to happen. Not via changing the list.

Access combobox value

I have a combobox, and a button, that makes runs a query with the values it gets from combobox, but it does not seem to get the right value.
I tried using
[Forms]![Kooli otsing]![Combobox]
or
[Forms]![Kooli otsing]![Combobox].[Text]
the query did not work, it seems like it does not get the value from combobox. because it worked with normal TextBox.
I ADDED EXPLAINING PICTURE!!!!!
ADDED PICTURE OF VBA EDITOR
ADDED PICTURE OF ERROR AND NO COMMENT AUTOCOMPLETE
Based on the latest comments you posted on your question, you want to use:
[Forms]![Kooli otsing]![Combo19].Column(1)
Here's why. You said you have the following settings for your combobox:
column count: 2
bound column : 1
row source type : table/query
row source: SELECT [Haridusasutused].[ID], [Haridusasutused].[Nimetus] FROM Haridusasutused;
Column count of 2 is telling Access to use the first two columns from your rowsource (the only two columns in this case). Bound column is telling access that the default value of the combobox should be the first column of the row source. In this case, that would be [Haridusasutused].[ID]. Often ID columns are autonumber fields.
The reason you were having problems is that [Forms]![Kooli otsing]![Combo19] was returning data from the ID column (most likely a number) not "Elva Gümnaasium". By adding the .Column(1) you are telling Access to choose the data from the second column (.Column is a zero-based array) of the rowsource, ie, "Elva Gümnaasium".
EDIT: Alternatively, you can change the bound column from 1 to 2 and leave the rest alone (ie, you won't need the .Column(1) part at all).
This works in my application:
[Forms]![Hour-registration]![mwkselect]
^form ^combobox
Maybe try this to refresh:
Me.Requery
Me.Refresh
Have you tried to step through debugger and search for the value through the watch window? For instance put a breakpoint into a button click event, then add [Forms] to the watch window and look into it.
You can use:
[Forms]![Form1]![Combo1].[Text]

MS Access Dropdown List/Combo Box

This should probably be pretty simple but my Google-Fu is as yet unable to find an answer. I simply want to create a dropdown list in Access so that upon selection I can perform some action based on the value of the selection. For instance, I have a list of people and I would like to populate the combo box so that their names appear in the list but the "value" is set to their ID (the primary key).
It sounds like you might be asking how to display something in the dropdown other than the ID while keeping the ID as the returned data from the dropdown. If that's the case set the Bound Column to the ID field (usually 1) and (assuming the name field is next) set the Column Count to be 2 and the Column Widths to be 0";1" or 0";[whatever width you need].
You will need to hook into the onchange event for the dropdown list.
and from MSDN
How have you set the properties for your combo box?
Perhaps you could try setting (assuming you are pulling data from Table1 with fields ID and Field1
Row Source: SELECT [Table1].[ID], [Table1].[Field1] FROM Table1;
Row Source Type: Table/Query
Bound Column: 1
Column Count: 2
Column Widths: 0", 1"
and then hook into the onchange event as Chris Ballance suggests. The value property of the combo box is ID; the text will be what is in Field1.
OK, I figured it out even though it was a bit counter-intuitive. An Access Combobox can have as many values as you want (instead of just one key on value). By default all of the values are are shown in the list so you need to hide certain columns by setting their widths to 0. That is done via the ColumnsWidths property in the property pane. ColumnWidths takes a comma separated list of values which corresponds to the order of the columns in the list. I hope this helps someone.