How Can I show/hide fields under custom grid form with UI component? - admin

Anyone, please let me know how can I create custom show/hide fields under the UI component form.
I need to create a drop-down and add options E.G.- Job and Departments.
If the user clicks on the job then I need to show the job code under the drop-down.
This is done.
But now I need to know how can I show a second drop-down based on the job or department's click.
If the user selects the Job option from the first drop-down. Then I need to show the second dropdown with job code options.
If the user selects the departments from the first department then I need to show the departments under the second drop-down.
If there is any way in the Magento so please let me know.

Related

How to show blank data until refresh for direct query in power bi

I have created one report from Direct query.
Now the requirement is when we open the report, it should show blank data until user refreshes it.
When the user refreshes it the data should be shown.
How can I achieve this?
You can emulate this with some tricks:
Create a bookmark with no applied filters
Create a button and assign this bookmark as the button action
Filter your page to show nothing (apply some bogus filtering)
Save and publish report
This should make the report show nothing by default, and when the user clicks «show data» or whatever text you put on the button, the user is moved to the bookmark without any data filters, so the data is shown.
Outside of this method I can’t think of other means of showing data only when the user clicks refresh.

PowerBi select value filter multiple pages

for info i'm very new to using PowerBi.
My problem :
I have a matrix on my first page with various info on my client like their number, the number of the contract, etc.
I want to click on a row and then click on a button that will send me to a second page. The second page contains all the informations concerning the specific contract associated to the row I've selected.
And i want to have multiple buttons that send me to the pages developping the information i want. So i guess I want it filtered on all pages then just something that redirect me keeping the filter of the row on?
Thanks in advance!
How do i set this button to achieve all that??

How to create a magnifying glass beside a form field in admin change form to run a script

I'd like to put a search icon (like magnifiying glass) beside a field in the admin change form to let the users to trigger a script to fill other fields on demand only. I have to avoid triggering any field event (blur, click, change etc) on this field because it has to be triggered under users request, according to their needs.
Django has its own magnifying glass icon/link for raw_field foreign key selection popup. Is it possibble to do something similar, where I would trigger the script upon the magnifying glass click. It will be just a JQuery to call a webservice and return values to be filled up on some other fields.
I found one working solution by putting a custom button as a field, but it is placed far from the field because its label (what seems weird for my purpose).
Let me know if this description is enough or additional information is needed.
example here
Tks.

Update model field in Django with button click on a template

I am new to Django and I am having some troubles with my first web application.
My idea is to show a template on user first login with some information about the web. The template contains an "accept button" and a "continue to the webpage" button. This template should appear everytime the users login, until they click on the accept button.
I have created a new model with userID, a boolean field (terms_accepted) and a date field (terms_accepted_date) to control if the users have accepted the information, and the date when they have done so. What I want is to update the terms_accepted (from False to True), when the users click on the accept button.
Is there a simply way to modify the model from the template? I have created the correct flow, because If I modify manually the terms_accepted field from the admin site, when I enter to the page I don't see the template with the information. However, I don't know how to update the field automatically on button click.
Thanks
please take a look at this tutorial:
https://docs.djangoproject.com/en/1.10/intro/tutorial04/.
In the example the form is more complicated, but you can see how the model is updated in polls/view.py

How to save current sysdate in apex

I am using Oracle APEX to build an interactive report, in the edit page, there is a display only field called update time and the value is the last updated time. When I click submit page, I want to update this field to the current sysdate.
What I did is that I created a dynamic action which fires when page uploaded. The action changes the update time field to the current sysdate. However, this doesn't work. I am wondering if there is any other ways to do this? Thanks!
If you have a unique column in your table, you can create a procedure in page processing section and assign it to the submit page button. When you click submit button, procedure will update the update time field.
To make a page processing:
Go to Process section and click create button
Select PL/SQL Code as Process Type
Give a name to your Process
Write your procedure in field. You can assign a fields value like: update table set update_time = sysdate where ID = :P3_ID
You can define success or error message
Define your button to When Button Pressed section
Hope this helps.