Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Disable Field until Option is Checked


GarryBargsley
 Share

Recommended Posts

Hello everyone...

 

Does anyone know an easy way to setup two fields to be like disabled until a radio button is checked in a value list?

 

I have a value list with technicians name, and I do not want the technician to be able to enter a value into two differnent fields until the select their name in the value list.

 

I have seen posts on this before, but I cannot find them for the life of me.

 

Thanks

Garry b

Link to comment
Share on other sites

AHunter3,

 

 

This is way way too cool... I've been looking for a solution like this for months...

 

GarryBargsley, thanks for asking the question..

 

Best Regards, BLevey

Link to comment
Share on other sites

Since this trick can be done with multiple portals, each relationship based on it's own criteria, it would be really cool if they could be stacked on top each other. In trying to do this, I've found that the portal on bottom becomes visible when the criteria is met, but is not accessible, any thoughts?

 

Blevey

Link to comment
Share on other sites

What is it you're trying to accomplish? You want Portal A (and whatever objects are within it) to become visible/accessible when Necessary Conditions A are met, but Portal B (and whatever objects it contains) to become visible/accessible instead when Alternative Necessary Conditions B are met instead, in the same location on the layout?

 

No, you can't put a portal within a portal. (Well, you can, but it won't behave in a useful fashion).

 

You can fake it.

 

Calc Field X = Case(Necessary Condition A="met", Field A, Necessary Conditon B="applicable", Field B).

 

Calculated Phony ButtonField Container = Case(Necessary Condition A="met", g.Button_A_CtrField, Necessary Condition B="applicable", g.Button_B_CtrField)

 

If the fields you are hiding/showing are to accept data entry, you'd have to make arrangements for data entry, too. e.g. —

 

ClickField Script =

 

Set Field [Table::g.DialogGlobal, ""]

Show Custom Dialog, Title = Case(Necessary Condition A="met", "Enter FieldA Info", Necessary Condition B="applicable", "Enter FieldB Info"; Message Body= "Please enter the "&Case(Necessary Condition A="met", "Field A", Necessary Condition B="applicable", "Field B")&" info in the blank and hit 'OK'"; Allow input, field= Table::g.DialogGlobal]

If [Necessary Condition A="met" and not isempty(Table::g.DialogGlobal)]

..Set Field [Table::Field A, Table::g.DialogGlobal]

Else If [Necessary Condition B="applicable" and not isempty(Table::g.DialogGlobal)]

..Set Field [Table::Field B, Table::g.DialogGlobal]

 

OR

 

Put Table::g.DialogGlobal in the portal and a button next to it, "OK" or perhaps "Accept Input" or something. And the "OK" or "Accept Input" button sets the appropriate real field to the value of the global.

 

The latter method has the advantage that you can apply a value list, using the same cute little selfjoin relationship you're using for the portal trick.

 

Define a calc field, call it "Context-Dependent VL", and define it so as to contain the values that would be appropriate for any situation, e.g., Case(Necessary Condition A="met", "Type-A Possible Value One"&"¶"&"Type-A Possible Value Two"&"¶"&"Type-A Possible Value Three", Necessary Condition B="applicable", "B-appropriate Value 1"&"¶"&"B-appropriate Value 2"&"¶"&"B-appropriate Value 3")

 

 

Then define a value list, field contents of Context-Dependent VL, using related values only, via the selfjoin relationship used by the portal, and apply the VL to the global field.

 

That only works if the values you want for the different possible portalfields are all indexable; if they aren't, the field "Context-Dependent VL" needs to be a plain text field and you have to set it using Set Field in a script that runs prior to giving the user access to the global field.

Link to comment
Share on other sites

Hi Ahunter3,

 

Here's my current situation. Currently, I'm using tabs for grouping fields. On a form let's call Corrective Action, I have three tabs (Supplier Problem, Customer Problem, In-house Problem) and each tab has 10 - 20 fields on them. Above the tabs are all the fields (~20) that are common to whomever the problem was casued by, such as Job No., Date. Needed by and etc. The customer would like to have a drop down or check box to select who ownes the CA and then only see the fields associated with them. I didn't want to have three different forms, so I used the tabs.

 

If it was possible to have three portal fields on top of each other, where the criteria could determine which relationship was valid and show that data and allow data entry would be great. Or if there was a way to have only the tap associated with the selection, displayed would be great.

 

Am I explaining this so you can follow what I'm doing/thinking.

 

Blevey

Link to comment
Share on other sites

In my opinion, you should use different layouts for each "tab" and use graphic buttons that look like tab controls for navigation. Think 'old school'.smiley_cool

 

 

Yea, I thought about that, but it makes the nagivation a little more difficult, as you have three forms/layouts to navigate to/from.

 

Thanks to all for the input and feedback, I truly enjoy this site and couldn't function without it...

 

Regards,

Blevey

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use