I have the following form for my APEX app
The user set dates on this form
On the computer version, the user can delete the date and leave the value NULL. But in the smartphone that doesn't happen. Is there an atribute or button I can set on APEX so that the user has the option to set a date NULL?
Just for context: this is a form to add a task, but an already added task can be put ON HOLD (not scheduled) to be dealt with later. That's why the user might want to take a task out of the schedule and plan it later.
I don't have any mobile applications, but - did you try one of the following:
create a button which - when pressed - runs a process which sets
:P1_START_DATE := NULL;
create a button and its dynamic action that Clears the start date item
enable Quick picks for the date item and set label-value pair to
Label: No start date
Value: leave it empty
Related
I have an APEX form I'm developing for "user settings". I have a table with a sequence as a primary key and the users ID in another column...in addition to a few columns where each users saved settings are stored (things like "N" for do not receive notices).
I haven't used Oracle APEX in a while so excuse this likely newbie question...The insert works fine, but I'm having trouble with making the form only show the current users values. In my Form Region the source is set to my Table, and I have a WHERE clause like this:
USER_ID = 813309
But that's not working (813309 is my id and I'm just hard-coding it for now). The form always comes up with a "New" record.
For a form to load a specific record you can set the primary key page item to the value you need. You can do so in the url using the link builder from another page or you can set a computation on the item. That is what I would try in your case: add a computation to your item P_USER_ID of type "Static Value" with value 813309. Make sure the computation happens before the "Fetch Row" - the value obviously needs to be set before the process runs.
In such cases, I prefer creating a Report + Form combination (using the Wizard, of course): it creates an interactive report (so that you can review data in a table), and a form which is used to add new records or update/delete existing ones.
Doing so, when you pick a user in interactive report and click the icon at the beginning of a row, Apex redirects you to the form page, passing primary key column value to the form which then fetches appropriate data from the table.
Not that it won't work the way you're trying to do it, it's just simpler if you let Apex do everything for you.
So: did you create an automatic row fetch pre-rendering process? If not, do so because - without it - Apex doesn't know what to fetch. Also, if you hardcoded user_id, it won't do much good. Consider storing username into the table so that you could reference it via :APP_USER Apex variable.
So i have created a custom dynamic action that is supposed to run "beforeunload" (in case user closes the tab/browser unexpectedly or navigates away from the page in a manner not intended). This dynamic action runs a simple plsql procedure ( http://prntscr.com/qz0a6c ). A few days ago the Chrome browser updated to version 80 and in this new version "beforeunload" is disallowed and now my dynamic action does not work.
Does anyone have an idea on how I could build this functionality differently? Apex 4.2 is in question.
I guess you are hitting Disallow sync XHR in page dismissal So to turn
your DA to asynchronous one try to set Wait for result property of
your dynamic actions to false.
Here's a complete answer that you should be able to adapt to your situation.
Create a new table to record send beacon data.
create table beacons (
id number generated always as identity primary key,
app_user varchar2(255),
date_sent date,
data varchar2(4000)
);
I used a varchar2 for the data but that could be a CLOB if needed. I'll be passing the data in using the p_clob_01 parameter for Ajax.
Create an Application Process named RECEIVE_BEACON in the Shared Components. Use the following code for the PL/SQL code:
insert into beacons (
app_user,
date_sent,
data
) values (
:APP_USER,
sysdate,
apex_application.g_clob_01
);
Create a Dynamic Action named Window beforeunload. Set Event to Custom, Custom Event to beforeunload, Selection Type to JavaScript Expression, and JavaScript Expression to window.
Select the Action for the Dynamic Action created in step 3. Set the Action to Execute JavaScript Code. Copy/paste the following into the Code field.
var beaconData = {
test: 'value'
};
var formData = new FormData();
formData.append('p_flow_id', '&APP_ID.');
formData.append('p_flow_step_id', '&APP_PAGE_ID.');
formData.append('p_instance', '&APP_SESSION.');
formData.append('p_debug', '');
formData.append('p_request', 'APPLICATION_PROCESS=RECEIVE_BEACON');
formData.append('p_clob_01', JSON.stringify(beaconData));
navigator.sendBeacon('/pls/apex/wwv_flow.ajax', formData);
Save your changes and run the page. Then refresh the page to trigger the Dynamic Action and send the beacon. This example shows how you can send random data from JavaScript but also get session-related data, such as the user name.
In social network features in odoo 8. In one, Purchase Order > In Shipments > Transfer.
After transfer, it is showing "Products received Administrator updated document"
But I want to see who has clicked "Transfer" button. I have attached screen shot.
you have two options,
create a log note for the related record with whom clicked while clicking the transfer button.
this is achieved with the feature of track_visibility
eg: partner_id = fields.Many2one('res.partner', string='Customer', track_visibility='onchange', index=True,
Here whenever you made change on the partner_id field will create a log note.
another value of track_visibility is 'always'
eg:
name = fields.Char(string='Task Title', track_visibility='always', required=True, index=True)
this will log values always has a data.
Lets take the first option.
make a new field which will update the flag when ever the transfer button clicks. and give the attribute track_visibility = 'onchange'.
eg: flag = fields.Boolean(string='string', default=False, track_visibility='onchange')
overide the function which trigger the transfer button and update the value. You can see the log note who is done the transfer.
or with the same function without the extra field you can create a log note for the record.
I am trying to add a set of PFUsers in the Data browser with emails, validated, passwords and usernames so that I can test a feature in my iOS app. But as I add the users, the passwords are lost and the validated field will not stay as 'YES'.
How can I add users for testing?
The process I've found success with is:
Adding a row.
Double clicking the appropriate cell to add a username then pressing enter.
Doing the same for password.
At the point it generates an ObjectId and I know the user has been stored.
In terms of a validated field, is that a column you added yourself or are you referring to the emailVerified column?
EDIT: In the case of emailVerified, you should be able to double click in the appropriate cell and it should present a drop-down of Boolean values that you can select.
I have a Master Detail form in my Oracle APEX application. When I am trying to update data in this form, I am getting below error.
Current version of data in database has changed since user initiated
update process. current row version identifier =
"26D0923D8A5144D6F483C2B9815D07D3" application row version identifier
= "1749BCD159359424E1EE00AC1C3E3FCB" (Row 1)
I have cleared browser cache and try to update. But it not worked.
How can I solve this?
I have experienced similar problem where my detail records set has timestamp fields. By default master detail wizard creates the timestamp fields as date picker type fields. If you set the date format on these, it would resolve the issue.
This blog post tries to address this issue on a Tabular Form (I know that's not what the original issue was with, but thought it might be related). It says the same as #sangam does below.
Short version: If you have an updated field that's timestamp datatype, you should set a date/time format.
http://apexbyg.blogspot.com/2015/05/tabular-form-bug.html
My tabular form has a field that's timestamp datatype, but I had already set a date format, so this didn't help me.
Here's another possibility, which I discovered was the case in my application.
That would be if the data the original checksum was calculated on is truly different than the pre-update checksum calculation, due to a design-flaw in your query!
In my application, the source for one of the updateable fields was COALESCE(name_calced, name_preferred). In the source table, the person's name could already be loaded in the record by an external process and we save it to one field - name_calced. But the end-user can enter a preferred name, which we wanted to save to the name_preferred field. We wanted to initially populate the displayed, updateable tabular form field with name_calced, if one existed, or name_preferred if the user had already provided a preferred name. Then they could change that value and save it back to the database.
I finally discovered that the Save action threw the error message if name_calced was non-null, but name_preferred was null. I realized that the initial checksum was calculated based on name_calced, but the pre-update checksum was based on name_preferred, so the application thought someone had changed the value in the background and showed the error message.
What I don't understand is how this problem didn't show up in the past 3 years the application has been running in production!
My solution is to make the field source only on name_preferred, which immediately solved this problem. I also think the back-end process will also get changed to pre-populate that table field from name_calced, so the user always sees the base value, if there is one.
I just had this issue myself. Now, I realize that tabular forms are deprecated at this time, but I have an application that was developed beforehand and still uses them. This issue occurred and I had to get one of our big guns at Oracle to help me out. I do a lot of DB work and a decent amount of Apex development but I'm more of a Java, WebLogic, etc guy, and I really couldn't figure this one out.
In my case, it turned out to be really simple. One of the columns in my tabular form was a hidden field, generated via a sub query. Being hidden, this column is not editable by the user and should not be part of the MRU update. I had the field set to "Hidden Column (saves states)" and setting its type to "Hidden Column" fixed the issue. So, this leads to sub queries being executed in such a way as to change the checksum for the overall query before hitting submit (save), causing the error.
For those who are continuing to troubleshoot this, look at your query for every field that you have specified and note which columns are editable in the tabular form. All other fields should be set in a way that makes them not save state so that they are not part of the update.
I had this error when I had two update processes processing on submit.
My solution was to add a condition to both processing steps. I had forgotten to do this when I made an additional process for Button A, but I never updated Button B to limit it's behaviors.
Navigation:
Processing -> Processes -> [Your Process Name] -> Server-side Condition -> When Button Pressed = [Your button Name]
In my case I had a column from a secondary table that was not set as Query Only and was being updated! The error would occur trying to save a column not in the table being updated. It took me half a day to figure it out (the column names were the same).
Set your Link column hidden to display only in the form.
Set "Send On Page Submit" to 'No' or disable the link column that is your primary key ( Rownum/rowid/id etc).
Hope it will work for you.
I have noticed this error comes when I was working Tabular Form and has disabled one of the form operations i.e. by setting server-side condition to "Never" for add, apply changes (submit) buttons
When I have restored back to its original state, it worked as expected.
In case you have to hide Add/Update button, use some other option.
https://compknowledgebase.blogspot.com/2018/12/oracle-apex-error-current-version-of.html