How to restrict invoice number to exactly 10 characters through form personalization in oracle apps - oracle-apps

My requirement is when the draft invoice is approved release button is enabled in release block we can enter invoice number. I need to restrict the invoice number exactly equal to 10 digits. If the user enters invoice number less than or greater than 10 I need to show error. Every thing is working fine but the problem is suppose for example if user enters invoice number less than 10 characters and presses ok error is shown and if user clicks cancel button after that. The release block is closed and the invoice status is changed to released and invoice number will be the number which is given by user, but my requirement is suppose user clicks cancel after pressing ok button the invoice status should not change to released.
I am using when-validate-record trigger for release block and in condition checking whether length of invoice_number is 10 and based on that showing error.

Related

Looker Alert Issue

I am new to Looker and trying to create my first alert. The requirement is simple when a status field (calculated field) is greater than 1 looker should send an email. Though a couple of records value is more than 1 still not sending an alert. I didn’t schedule a delivery, just created an alert.
FYI: Row count exceeds 5000
I wanted the Looker to check every 15 min if the calculated field is greater than 1.
attached is the Snap of the alert
Can anyone please help me with what needs to be done?
TIA
Your setup looks correct. Check your permission and do a test run before scheduling the email.

How to search if a value exists in table

I am trying to delete records via GUI. I have a text input in my section mapped with property (.EID) which intakes employee ID (for example 1) and when i click a button 'delete' that particular record should be deleted from DB. I have written an activity that successfully deletes.
But I want to display a message if the entered employee ID is not present in the table. For example if I have already deleted record 1 and the user again tries to delete record 1 it should display a message saying "employee doesn't exist, please enter existing ID". I have used obj-open->obj-delete->commit to delete the records.
Please help me how to achieve this.
I have attached screenshot of my GUI, for example i have already deleted record no 2, so when user again enters 2 and clicks on delete button it should display a message saying "no such user".
You can launch a local action(flow action) on the delete button.
In the pre-processing of the flow action call one activity. Pass the employee id as parameter to the activity.
In the activity do obj-browse on the table and add filter on employeeid column.
Store the count of obj-browse in a property. If the count of the obj-browse is greater than 0 then delete the record.
The section of flow action will display 2 messages based on when condition. One message will become active when count is greater than zero which will display Account deleted and another message will get active when count is zero which will display account does not exist.

Asp.net how to suggest multiple words inside textbox

Summary: I'm doing a web app to manage products in a warehouse. So I have a db with list of products and quantities. I have one page for unload products when they are used. On that page I have a textbox in which users write the note on how the product has been used.
Request: when users type inside the textbox I'd like a popup to appear showing products that contains the entered characters. More than 1 products is possible. Also users enters quantity of the used products, so I'd like that my app can update the db with new value.
For example:
I have a product named "AAA batteries" and I have 10 in stock.
I also have "9V batteries" 5 in stock.
User write "Used 3 AAA batteries and 4 9V batteries"
While typing I'd like popup appear suggesting "AAA batteries" etc.
Then I'd like to update the db subtracting 3 AAA and 4 9V.
It's ok to use delimiter characters
User press a button to save the note (db should be updated at this point)
Is this possible? I'm already using the ajax autocomplete extender but it can't do exactly what I want. I did a lot o searches but I can't find the right direction, can you help me? Thanks

Function for Google Feeds API to skip entries?

Is there a way to call the Google Feed API so that it skips X number of entries in a feed?
To explain the context:
I'd like to load additional entries on demand from a particular feed. So a user can click a "Load more" type button, and an ajax function fires to retrieve additional entries. Just to put some numbers on the scenario, lets say I load 10 entries by default, and want to load an additional 10 each time a user clicks on a "load more" button.
With the historical entries / numEntries API functions, I can essentially solve my problem by retrieving 10 + ( number of entries already loaded ), and only output the last 10. But this is pretty ugly, because every time a user loads another 10 entries, they have to load ALL the previous entries as well, so the load gets larger everytime they load more entries. Seems pretty inefficient!
Inspecting the API docs at Google, I couldn't find any reference to a "skip entries", or "start from X entry" type of API method / variable, so I could make my ajax call nice and lean, and just get 10 entries, starting from ( number of entries already loaded).
Anybody have any experience / suggestions for me?
I think you'll have to load all items first, but only display 10 at first. If they click "show more" you then show them the next 10 (you'll have to keep an internal pointer of your position in the list of items). So essentially, you aren't "loading" 10 more, you're "showing" 10 more.

How to change a status of a button in gridview

I am working on a job portal site where user can enter multiple profiles.
I am showing all profiles in a gridview. My requirement is now that
there should be a status link with his all profiles (it is in bit).
Example:
This is my gridview:
jobseekerid | Profileid | status
1 2 Active
1 3 DeActive
1 4 DeActive
....
....
From all of this only one profile can be active.
So when the user clicks on any inactive profile, it will become active and then all
remaining profile will become inactive.
The condition is that at a time only one profile can be active. (When he make his one profile active, the remaining ones will become inactive automatically.)
Now the Problem is, I am not able to make all the remaining profiles inactive when the user makes a profile active in the gridview.
How can I do this?
This is a common problem, and is usually solved by retaining the original dataset that you populated the gridview with. So, in your case, you should stored the dataset (or a list of profiles - whatever dataset you used to populate gridview) in a viewstate (given it is not too big, otherwise the page will load slow). Then, when you populate your gridview, you need to assign a profile ID to each click event, so you know which one got clicked. You then need to loop over the dataset that you saved in your viewstate, and update all of them (except the one that just got clicked) to inactive. The loop is not as cludgy as it sounds... with sql server 2005 and 2008 you have a new datatype called 'table', so you can pass all the other profileIDs in a one swoop to the DB to update them all to inactive.
Upon an update, loop through the table rows of the Gridview and change the values accordingly, if that's sufficient enough to update the record in the backend. If there is a value associated with it, you could hold that value in a hidden field and change the value in the hidden field as well.
If these changes are going to happen on the fly (i.e. you are updating the database upon a change), you could set a hidden field as a postback trigger and eval() it when you've clicked on whatever button is saving your updated record with the updated status. This would cause the RowCommand to fire, where you could loop through each record and update accordingly.

Resources