I want if the month is available, does not complete the entry, and a message appears that the month is already there
This code works, but unfortunately repeats the month
I have more than a thousand records in the same month
Of course, choosing a month from Drop Down
What is required is that if the month is done … it will not be repeated when he chooses another month
Assume the month field name in your current table that related to the “Row_Inserting” server event is “month_id” and its field type is integer or numeric, then try this:
$result1 = Execute("INSERT INTO aihtisab(ID_NO,BOUNS_CODE,month_id)
SELECT reward.ID_NO,reward.BOUNS_CODE,type_month.month_id
FROM reward,type_month
WHERE type_month.month_id = " . $rsnew[“month_id”] . “”);
I want now if he wants to enter the month in advance to enter it
I want to refuse to enter the month entered and inform him in the message the month was entered
Follow the same topic
I want to hide the month from Drop Down
The month whose data was entered as in the code above
So that the month is not repeated twice
Noting that the month is repeated in all records entered
The idea of writing the code … but I don’t know how and where the code is :
if (this.value == “1,2,3,4,5,6,7,8,9,10,11,12”) {
$(this).fields(“month_id”).hide();
} else {
$(this).fields(“month_id”).show();
}
}
The intended months entered do not appear again in the drop-down list
// Row Inserting event
function Row_Inserting($rsold, &$rsnew) {
// Enter your code here
// To cancel, set return value to FALSE
$result1 = Execute("INSERT INTO aihtisab(ID_NO,BOUNS_CODE,month_id)
SELECT reward.ID_NO,reward.BOUNS_CODE,type_month.month_id
FROM reward,type_month
WHERE type_month.month_id = " . $rsnew[“month_id”] . “”);
return TRUE;
}
// Lookup Selecting event
function Lookup_Selecting($fld, &$filter) {
//var_dump($fld->Name, $fld->Lookup, $filter); // Uncomment to view the filter
// Enter your code here
But i want this code but it is not working:
The month is not equal
Is there a better idea than writing the code this way? Also, the code does not work
// Lookup Selecting event
function Lookup_Selecting($fld, &$filter) {
//var_dump($fld->Name, $fld->Lookup, $filter); // Uncomment to view the filter
// Enter your code here
I tried this code but it is hidden in either case whether it has value or not
I want if it has a value in the field (month_id ) it hides
// Lookup Selecting event
function Lookup_Selecting($fld, &$filter) {
//var_dump($fld->Name, $fld->Lookup, $filter); // Uncomment to view the filter
// Enter your code here