(1/2 Solved) 8.1 UI Q. How to Unset Reference?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2458
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

(1/2 Solved) 8.1 UI Q. How to Unset Reference?

Post by Jaymer »

I have a Plain Text field (Status). Set to use Dynamic Choices calc'd at Runtime.
(Basically, uses a Query to display only a certain set of options based on your user level)
NOTE: Originally, this was a simple field using Aware "Choices". However, Choices does not allow any Logic to limit which choices are shown.
Example: Men work on floors 1,2,3. Women on Floors 4,5,6. Valid Choices are 1,2,3,4,5,6. But no way to limit what choices are shown when viewing the pulldown. So I made a Table of Choices with an additional column "Sex". At runtime, the Custom Query kicks in and only shows Choices for the current Sex.
This does NOT need to be (and WILL NOT BECOME) a reference field.
This main file will be accessed 10,000+ times a day - I don't need an additional Query to hit the "Floors" table for every row in the grid that is displayed by hundreds of users every day, which is what happens to every ps_xxxx Peer field in the main table of the grid.
This is an issue simliar to Access Levels which was presented here: https://www.awareim.com/forum/viewtopic.php?f=1&t=10362

# 1 :?: Using Status in the pic below, HOW DO I force selection of 1 of the choices in the pulldown? because it lets me type in my own value and/or leave it blank.
Screen Shot 2018-08-28 at 11.47.50 PM.png
Screen Shot 2018-08-28 at 11.47.50 PM.png (35.14 KiB) Viewed 3399 times
Appt. Set was the option from the pulldown. I typed the rest in manually.
Should I use Required or Calculated in the setup of the field so the user cant type anything?

I'd think this Dialog box would be the perfect place for a checkbox (or a few):
---> [ ] Require a selection from Choices
---> [ ] Choice can be left Empty
---> [ ] ?????

Screen Shot 2018-08-28 at 11.43.18 PM.png
Screen Shot 2018-08-28 at 11.43.18 PM.png (52.9 KiB) Viewed 3399 times

SOLUTION TO # 1:
I made a Rule in the Lead table (thats the main customer/person table shown in the above pic.)
Screen Shot 2018-08-29 at 3.29.24 PM.png
Screen Shot 2018-08-29 at 3.29.24 PM.png (8.71 KiB) Viewed 3354 times
Last edited by Jaymer on Thu Aug 30, 2018 7:35 pm, edited 3 times in total.
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
Posts: 2458
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: 8.1 UI Questions

Post by Jaymer »

# 2 :?: Using Owner in the pic below, what is the correct mechanism to allow a user to "unpoint"/"unreference" a record in another file.
Its not mandatory that a Lead have an Owner. That means its unassigned. It doesn't need to have an Assistant, or a Source. So if a value was picked and saved accidentally, I need to offer a way for the user to blank out the option.
NOTE: This is a Reference field. Same thing you'd do to assign a Sales Rep (from a Sales Rep/Employee master table) to a Customer.
It does not use Choices.
I need to execute "in aware code": Lead.ps_Owner = UNDEFINED


What can go at the location of the Arrow?
This is a Form where the fields are set to the Width of the Form minus 20 pixel.
Unless I add another column, I can't force something there.
I could prolly use some JavaScript to put an icon right AFTER the field, but lets keep it in Aware for now.

What are my options?
How do you guys "clear" a reference when a mistake has been made?

thx
jaymer...
Screen Shot 2018-08-28 at 11.47.50 PM 2.png
Screen Shot 2018-08-28 at 11.47.50 PM 2.png (31.28 KiB) Viewed 3397 times
Last edited by Jaymer on Wed Aug 29, 2018 7:35 pm, edited 1 time in total.
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
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: 8.1 UI Questions

Post by PointsWell »

#1 - If your drop down is retrieving values from a lookup object, why not just use a reference object instead of plain text? That would definitely prevent adding in random text.

As a rule I don't use static text fields for lookups because a change in term then requires an app rebuild, where if the client decides to change Contract to Agreement I can just change that in the database. Obviously I don't ever use Contract for my processing I use a Code value that represents Contract in my Reference BO. If you stick an active from and active to date on it you can also allow for a change in nomenclature across time while retaining prior usage

#2 - if blank is a valid option for the people drop downs then if you set the Empty text setting to "None" or "Not Defined" or some such and then check the Include Empty Text in Choices checkbox it will then show
"Not Defined" when the form loads and the list of people when you select the drop down with the "Not Defined" in the list.
If you select a person and then change your mind you go back in and select Not Defined (which annoyingly is alphabetic in the list, ie Not Defined is are Norman Bates).

When you select Not Defined then it sets the field to UNDEFINED
Screen Shot 2018-08-29 at 16.09.45.png
Screen Shot 2018-08-29 at 16.09.45.png (79.46 KiB) Viewed 3392 times
If you check Empty Text in Choices but don't set the Empty Text value then it becomes a PITA to clear it and usually beyond the capabilities of a user (not unreasonably).
Post Reply