Lets say I have a text field with static choices: North, South, East
When I enter a BO to create a new record, SOMETIMES I need to eliminate East from the choices.
(based on some testable condition).
How can I remove "East" from the dropdown data source so only North & South are the available choices to the user.
I need some help with the Jquery/JS.
(Note: I have already done a dynamic rule which says "You cannot select East at this time" if this is one of those time - but we need to eliminate East altogether from the list)
how can i use JS to remove a Combo Box choice ?
how can i use JS to remove a Combo Box choice ?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 1457
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: how can i use JS to remove a Combo Box choice ?
I have repeatedly requested the ability to write conditional queries to allow for:Jaymer wrote:Lets say I have a text field with static choices: North, South, East
When I enter a BO to create a new record, SOMETIMES I need to eliminate East from the choices.
(based on some testable condition).
How can I remove "East" from the dropdown data source so only North & South are the available choices to the user.
I need some help with the Jquery/JS.
(Note: I have already done a dynamic rule which says "You cannot select East at this time" if this is one of those time - but we need to eliminate East altogether from the list)
Code: Select all
IF Witch.Type="Good" Then FIND Location WHERE Location.Direction="North" OR Location.Direction="South" ELSE IF Witch.Type="Wicked" Then FIND Location WHERE Location.Direction="East" OR Location.Direction="West"
BO: Location
Attributes: Direction, Virtue
Then Witch.psLocation filter becomes FIND Location WHERE Location.Virtue=Witch.Type
You cannot achieve straightforward limiting based on the value of another field at the moment, this is a major PITA that requires extra data modelling to get round. the upside is reference data changes are not a development issue.
Re: how can i use JS to remove a Combo Box choice ?
right, but as in my case, north, south, east will always be north, south, east.
i don't want to create ANOTHER reference for something so simple - don't need database access just to pick from a choice list of 3.
There's Kendo example code on how to so exactly this - but I haven't found the key to adapt it to Aware terminology.
Another thing I guess, would be for Aware to allow building a Choice list from a text field "North|South|East" and use an expression to load it. Prolly easier to find the JS - I only need this on 1 screen in my whole app. 1 Form is used for North/South, another Form only for East (and thus it doesn't need the pulldown).
Sure, I could make ANOTHER field just to be used on the form with North/South, and then ANOTHER rule to move that selection to the real field.
i don't want to create ANOTHER reference for something so simple - don't need database access just to pick from a choice list of 3.
There's Kendo example code on how to so exactly this - but I haven't found the key to adapt it to Aware terminology.
Another thing I guess, would be for Aware to allow building a Choice list from a text field "North|South|East" and use an expression to load it. Prolly easier to find the JS - I only need this on 1 screen in my whole app. 1 Form is used for North/South, another Form only for East (and thus it doesn't need the pulldown).
Sure, I could make ANOTHER field just to be used on the form with North/South, and then ANOTHER rule to move that selection to the real field.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL