With an Oracle APEX form, is it possible to have other fields grey out based on other picks from a drop down menu? - oracle

I have a "Form" typed menu... in Oracle Application Express. In the menu, you pick whether you are raising a Problem or a Change. If you raise a Change, I want the estimated date of resolution field to be greyed out, because it's not relevant and might confuse users. Does anyone have any advice on how I may best achieve this? Thanks.

Dynamic Actions are what you need. You can define a dynamic action to occur on change of an item, which can show/hide other components.
The client-side condition decides true vs false.
See 'Creating an enable/disable declarative dynamic action in this OBE.
You could also check out other dynamic action examples with an application Juergen created here
Or even use them to invoke PL/SQL

Related

Dynamic content display

when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.

Nintex choice control rule

Any help would be highly appreciated.I am working on Nintex form and currently stuck with this rule to be worked.
I have first checkbox as YES/NO (Name: NA), trying to create a rule where automatically all the options (Name:Options) below automatically go uncheck when somebody clicks on this first "Not Applicable". If it could hide all the below options after clearing that would be great but not requirement. Definitely clearing them out is requirement.
Is there anyone who can help me with this. Thank you.
It would really help to see some screenshots of your form and it's controls.
However, I can tell you that a rule will not be able to change the values of another control. For this, you're going to want to use JavaScript in the Settings -> Custom JavaScript section.
I will often show/hide a portion of a form based on the selection of a control. And, when the section is hidden, I always want to clear out any data that may have been entered into those (now hidden) fields.
Here's an example:
Image of Form Example
And here's the code:
NWF$('#' + myYesNo).change(function(){
NWF$('#' + myChoices + ' input').prop('checked',false);
});
Every time the Yes/No field is checked, everything in the Choices field is unchecked.
I would also suggest adding a rule to the Choices field (and its label) that says not(myYesNo): like this.
If you didn't want to hide the choices, I would expand the JavaScript to test whether or not the Yes/No is currently true or false. However, hiding the choices entire remove the need for that test.

CRM 2013/2015/2016 subgrid popout, retain fetchxml query

I have a subgrid on my form which I assign a dynamically generated fetchxml query using javascript. When the user clicks on the subgrid's "pop out" button, the query is lost and it displays the default view for that entity.
The user needs to be able to perform multi selection and bulk editing. As far as I know this is not possible for subgrids in CRM 2013 upwards. Is there a way to retain the query when it is popped out?
There's no supported way to interact with a popped out grid. If you started digging into the client side application code, you might be able to find a hook to the new window, but doing so would be unsupported, liable to break, and I wouldn't recommend it.
I was going to suggest hiding that pop-out button on your entity's sub-grid altogether before re-reading that your users need to use the popped out grid for bulk edit.
In that case your best option will be to do ditch the JS and move to a RetrieveMultiple plugin against the sub-entity. RetrieveMultiple plugins should be generally avoided, but from what it sounds like in your case, it's your only option.
And, just to be thorough, are you positive you need dynamic fetch for the sub-grid? Is there any way you could come up with a view that would get close enough to your requirement, even if it's not perfect?
Update:
Based on the additional information you provided in your comment, I can only think of two options:
Implement a custom grid--or modify one of the free ones out there--that allows multi-select and bulk edit
Your custom web app takes the user's criteria, creates a personal view (entity: userquery) for the user and saves it to the database, then your JS on the form sets the grid to that view.
You can do that liks this:
document.getElementById("someGridId").control.SetParameter("viewtype", "4230"); // 4230 is the objecttypecode for userquery
document.getElementById("someGridId").control.SetParameter("viewid", "{11310965-0306-E611-80E5-3863BB36DD08}");
Doing this actually does make the popped out grid load the personal view, but in my tests just now the grid gets upset if you try to refresh it.
This approach has obvious downsides: 1) You have to come up with a way to clean up the personal views that get generated 2) the grid might break on refresh 3) it's unsupported and liable to break on an update.
Still worth considering, I suppose.
A more supported way instead of using unsupported getElementById is to hook a plugin to multiple retrieve of the entity and amend the query in there
Chris

Web App UX row selection best practice

Which is a better User Experience / Design decision for opening a table row (in a business website)? To place an "Open" button like this:
Or, to allow the row to be opened by clicking anywhere on it?
Your question assumes that people understand that there is more information to be gained by "expanding" these rows in this table. As this is designed right now, there are zero hints for a user that they are capable of viewing more information inside the same view that they are using.
Option 1: Open button
Let's assume (dangerously) that people are knowledgable that they can use this table to view more info about a line item in this table. The button itself is separated from the content it is referring to, breaking Fitt's Law. Also, the label is "open", which most users would interpret as taking them to another page, or opening a new context. "View More" or "Expand" would be a better label.
Option 2: Click anywhere
This is slightly better than the button, as it clearly relates the action to the content. However, it still doesn't solve the problem of exposing the functionality to the user.
I would recommend a combination of both of these approaches, making sure you are solving for Fitt's Law as well as exposing a label that will tell the users what functionality is present in these table rows, and how to access them.

Composite Fields In MSCRM 2013

I have a question on the subject of composite attributes that I would be grateful if you could help me with.
I posted this before on other question blogs but got no response I am satisfied with.
I am writing JavaScript that will update the fields (i.e. address1_line1, address1_line2, address1_line3, address1_city, address1_stateorprovince, address1_postalcode, address1_country) in the composite (address1_composite). When the fields are updated the composite does not seem to update. I have to open the composite and close it again. Is there a way of doing this automatically in JavaScript?
I have tried the following ideas:
Idea 1:
Xrm.Page.data.entity.save();
This is recomended at http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu.aspx
This is not any good as my customers want to view the composite before saving the page. Also I would not want to save the page for my customers as they do not want this. They would like to decide when to do this themselves.
Idea 2:
Xrm.Page.data.refresh();
This is not really what I wanted as I do not want to refresh the whole page. I just want to refresh the composite. Also it bring up a popup that warns you about not having saved the page which will be annoying for my customers.
Idea 3:
Writing the address from the address lines to the composite.
This feels like a nasty hack.
There is probably more than one way of doing this. I used the function
Xrm.Page.getAttribute("address1_composite")._attribute.setValueForCompositeField();
I do not like this for the following reasons:
This is a hack as it is not using the system functionality of the done button to write the data.
You do not get the system formatting you get with the done button although this will get done when the form is saved so it is not so bad.
In the future if customers are allowed to add their own composite fields it could cause problems as the field names could be different.
It requires me to write extra code for each form that has a composite which has fields with different schema names. E.g. I have to write different code for forms with ShipTo and BillTo addresses as the code for the account form will not work.
Another idea was to set the focus to the composite field after a change has been made to any of the fields inside the composite.
Xrm.Page.data.entity.attributes.get("address1_composite").controls.get(0).setFocus();
This is the best idea so for but it is far from perfect. This forces the user to press the done button and hence the fields will be written. I was hoping for something more automated.
My Question:
What would be great is if there was a way to click the composite done button in JavaScript. This would give me the formatting of the done button and the automation I need.
Update - 14/04/2014
Since posting this question I have been in contact with Microsoft and they say there is no supported way of clicking the done button via a program.
If the field is locked down CRM JavaScript does not send the data back to the server for updating. Another approach would be:
perform the update using JavaScript (so the user sees the change); and
use a server side plugin on the Update event so the value is persisted.

Resources