Hi All
I have an issue I need to resolve , In the App I have an admin section where the Admin users go and perform maintenance for records captured on a form in this example I will use Accident group where there can add ,edit or disable these Accident groups .
They can be Animals ,Fatigue ,Hijacking etc .
How can I achieve this ?, I have also added the attachments to show my screens .
Select the disabled and is now greyed out and can be edited
Not greyed on the form and can be used
Solved! Go to Solution.
Hi
Iam still getting an error so iam not sure :
If(LookUp('[rp].[Accident group]',Accidentgroup =DataCardValue46.Selected.Name, Checkbox2 = true,Accidentgroup,Notify("You cannot select this item",NotificationType.Error);Reset(DataCardValue46)
Hi @rmaziwis ,
I do not believe you can disable/grey out a drop down / combo box item in the control itself, however there are a couple of approaches you could take.
One would be to filter the drop-down list based on the criteria and simply not display it for choice.
Another would be to trigger a notification to the user instead and reset the box.
If you head this direction and want some assistance with the code, please let me know.
If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.
Hi
That is a tough one to work because it is a requirement ,I will keep testing in the mean time .
Hi
Iam considering trigger a notification to the user instead and reset the box option if we can go through that process i will be grateful
OK @rmaziwis ,
What is the trigger you would have used to disable the selection?
I will write something generic so you can get the idea
If(
<Whatever the trigger is>,
Notify("You cannot select this item", NotificationType.Error); //nice bright red message
Reset(<dropdown name),
<Whatever you would do if input valid>
)
Hi
To disable a field am using If(Checkbox2. Value=true,DisplayMode.Disabled,DisplayMode.Edit).
If i understand you correctly in the visible property of the accident group drop down OR in the field for animal I have formula like below :
and Am not understanding the part ,sorry Iam just trying to get this right?
<Whatever you would do if input valid>
You don't need an "else" on an "if" statement unless there is one - I just put it there in case you did something else if the box value was valid so,
If(
Checkbox2.Value = true,
Notify("You cannot select this item",NotificationType.Error);
Reset(DataCardValue46)
);
would work as a formula, however what method do you use to determine what item selected in the drop down needs to be disabled? I am assuming the disabled checkbox is in a table containing the drop-down values and you want to check this table to see if the item should be disabled?
I will ask you to confirm this however if this is the case, you need to do a lookup on that list for the value the user has chosen, then action the Notify if it is disabled. So - calling:-
On the OnChange property of the drop down
If(
Lookup(
Accidents,
'Accident Group' = DataCardValue46.Selected.'Accident Group',
NoShow
)
= true,
Notify("You cannot select this item",NotificationType.Error);
Reset(DataCardValue46)
)
You need to substitute your field and control names for the above. If the name has no spaces, you do not need the quotes '.
Also AccidentChoose.Selected.'Accident Group', may be something else depending on how you structured the drop down items
Hi
I really appreciate your a help and I am busy with this but just to answer you the table is called Accident group .
The list is accident group(drop-down) and animal is from that list let me substitute and give you feedback if the logic works .
OK thanks @rmaziwis ,
Please note timezone difference (I am in Australia), I look forward to the result of your efforts but may not get back to you until (my) morning.
Hi
Iam still getting an error so iam not sure :
If(LookUp('[rp].[Accident group]',Accidentgroup =DataCardValue46.Selected.Name, Checkbox2 = true,Accidentgroup,Notify("You cannot select this item",NotificationType.Error);Reset(DataCardValue46)
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |