Oracle APEX Navigation List Child Objects - oracle

I have a schema with two tables: a parent table and a child table. The parent table has an ID and a varchar column. The child table has an ID, parentID, and varchar column.
I want a page that displays all the varchar's in the parent table as a navigation list. When a link is clicked, it displays a page with a navigation list containing all the child items under that parent id. I'd like to be able to do this for 'n' levels of parent-child, hopefully by defining a total of 'n' pages.
I've successfully created the first list of links on a single page, but I am not sure how to proceed with giving them the appropriate URL to the child page, or how to create a child page that accepts a parameter and uses it in the definition of the subsequent list query.

In Oracle APEX, every page is defined at design time. This means that the developer chooses how many pages exist while he is developing. What it sounds like you are trying to do, is create pages dynamically, i.e. generate new page numbers on the fly. This is not possible.
However, I do not think that it is necessary to create new pages. It will probably suffice to have a limited number of pages, which simply pass the ID of the record your page is based on as a parameter. If you create a page item on a page, you can set the value of that item by specifying it in the URL you are directing to. You can find more information about APEX URLs here: Understanding URL Syntax.
After you've got that down, you can use the value of the page item on the page you landed on to generate the sub-list by fetching all the child records from the database and creating links for them. To generate the navigation list, I recommend using Lists in your shared components. Go to shared components > Lists > Create > From scratch and then choose to create a dynamic list. In the query you provide here, you can simply reference the page item id (e.g. :P1_RECORD_ID), to get the children of that ID and generate the list items accordingly.
I hope this gets you started. Of course this is just the beginning. If you have any more questions, please expand on your original question.

Related

Form WHERE clause

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.

Parent and Child report in RDLC

I want to create a report (.RDLC) in Visual Studio 2010. The report should show parent record initially when the user clicks the expand button it should load the child records in the same report.
I have employee records which has to be shown as parent record and when the user expands then the detail report should be shown with the list of projects the employee has worked on.
I tried with sub reports, but it showed me the parent records initially and when I select any record then it shows the details records in another report. but I want both Parent and Child records should be shown in same report. There is no grouping between the Parent and Child records. Employee id is the matching column.
Thanks,
Prakash.
The easiest way to group anything in an RDLC Report is by using the List component. Which you can nest as many times as you want. You can even fetch the data from multiple tables, as long as you group on a column which both data-sources have in common (FK).
Adding functionality like collapsing and expanding views comes after you grouped everything nicely.
You could start the list by grouping on employees and adding textboxes with the the data you wish to display. Inside the same rectangle you could then add a new list and group it on projects, inside this second rectangle you can then add a table, matrix or even add another list to group on something else.
You can find a good tutorial here. Option 2 is recommended, which is what I tried to describe in words and option 1 is probably what you initially tried, using subreports.

Restrict manager to only see list items created by their employees in SharePoint 2010

I am using a SP2010 custom list as a weekly time sheet for an organization of about 50 employees and 8 managers to use. To create an item, an employee enters client, project, activity type, week ending, and hours in the default view. Now I want to create another view that is restricted to managers. Ideally, I want SP2010 to know who the manager is, and restrict the items they can see to be only those items created by their employees.
I tried the following with no luck.
There is a user information list created by IT that includes all the members of my organization. I added the Manager's Name to every item.
I re-purposed the Modified By column appeared in my custom list when I created that list.
Specifically, I renamed the Modified By column which is a Person or Group type to Manager's Name and changed the value of Show Field: to Manager's Name. I would have rather not done it this way, but I couldn't figure out how I add a list column that is a Person or Group type, and allows you to pick a column to populate with the value I needed.
I saved the view settings and I could see the Manager's Names in the first column for their specific employees. So far so good!
Then I re-edited the view and created a filter that shows items when Manager's Name is equal to [ME].
I saved the view setting and this time I could not see any employee list items which made sense since I am not a people manager.
I had a colleague who is a people manager try it out and he saw no items for his employees, yet I know there are a dozen or so, and they showed up in #4.
I changed the filter to look for his name specifically, and he still could not see his employees, although I could.
So I figured it must be a permission level issue since his permission level was Contribute and mine is Full Control.
I bumped him up to Design level, and he could see his employees as long as I hard-coded his name in the filter for the view.
Do someone knows how to do this easily?
From what I have learnt, there are differences in creating lists and libraries.
A library does not seem to have the functionality displaying group fields in the correct format, whereas a list does. So if you want to create a view for managers / employees then you need to do it in a list, with the manager and employee both as columns in the view.
Just ensure that the employees and managers do not have access to edit their views.

FileMaker Pro -- Filtering Relationship Not Working

I'm trying to build a FileMaker Pro 11 layout that excludes records containing a certain value. The relevant data is in table Invoice. I want to filter so that Invoice records whose "Invoice Check Grouping" field is blank are not displayed on the layout.
I've added a global field to the invoice table called "Blank Invoice Check Grouping" to use as my filter criteria. I've created a self-join relationship to the Invoice table, joining "Invoice ID" to "Invoice ID" and joining "Invoice Check Grouping" to "Blank Invoice Check Grouping". The resulting table is named "Invoice Check Groupings".
The layout which I build based on table "Invoice Check Groupings" shows all records in Invoice--it does not filter out those with blank values. What am I doing incorrectly?
Thanks,
Ben
Layouts show records in a table (or more accurately, a table occurrence) and don't directly deal with related data. As mentioned by #pft221, you can use relationships for filtering, but only when viewing data through a portal.
If you always want a particular layout to show data based on a particular find, you can do so with a script and a script trigger. First set up a script to do the following:
Enter Find Mode[]
Set Field["Invoice Check Grouping"; "*" // Find all records with any data in this field
Perform Find[]
Note that you can also embed the find request within the Perform Find script step, but I tend to script finds in the above manner as it's easier to see what the find request is in the script and variables can be used in the find request.
Now you need to set your layout to execute this script whenever it's loaded. Go to the layout and enter Layout Mode. Select Layouts>Layout Setup from the menu bar. Click the Script Triggers tab and check the box for OnLayoutEnter and select the script you wrote above. Now whenever the layout is entered, that script will run and exclude the records that have that particular field being empty.
There are many ways to filter records, depending on what you are trying to do and what you are trying to display for your users.
The most common and simple way you can filter records is through a simple Find in a list view. I'm unclear from your question, but my best guess is that you're already using a list view and misunderstanding how FileMaker's relationships and Table Occurrences (TO's) work.
To Filter with the "Find Records" method:
Create a new List View layout of any Table Occurrence of your Invoice Table -- most likely you will want to use the default Table Occurrence that FileMaker created for you when you created the table.
Place the fields that you would like to display on that layout, including the "Invoice Check Grouping" field.
Switch into Find Mode
Put a '*' character into the "Invoice Check Grouping" field
Perform the Find
You should now see a list of all Invoices where the "Invoice Check Grouping" field is not blank. (You can find additional interesting search criteria in the "Insert: Operators" drop down of the title bar.)
Now you may actually be looking to filter related records through a portal but, given that you've set up a self-join on the Invoice index on the Invoice table my guess is that, at best, this would show either 0 or 1 record for each Invoice record you display in your main layout.
To Filter Records with the "Portal Filter" method:
Let's assume, though, that you have a Client table where you'd like to see only the records with a non-blank "Invoice Check Grouping" value. The table set-up would be as follows:
Client
Client ID
[... other client info ...]
Invoice
Invoice ID
Client ID
Invoice Check Grouping
[... other invoice info ...]
With a relationship in the relationships graph:
Client::Client ID ------< Invoice::Client ID
From there you would set up a Form layout on the Client TO and create a portal showing records from the Invoice TO. From the options for the portal you would select "Filter Portal Records" and use a formula similar to:
not IsEmpty(Invoice::Invoice Check Grouping)
Finally, it's worth noting that a portal filter isn't appropriate for all display situations or calculations. You can set up a similar filter completely through your relationships graph (as I believe you have already tried to do.) This will work, once again, for viewing records through a portal but not for the records displayed by a layout itself.
The answers above don't actually help Ben with his question. They are workarounds.
I have the same problem as Ben, and I don't think there is a solution, even now in Filemaker 12. There is I think no way to define a relationship that will omit the related records where the match fields are empty.
Two options come to mind:
On a specific layout, you have more fine-grained control in the portal definition itself, and can use this to exclude the records
You can now use SQL queries to achieve this result within Filemkaer.

how to bind telerik tree view to multple level stored procedures

I currently have a 2 level tree view that displays departments and then assets within those departments. To do this I am using a sql stored procedure to prepare the data. See the attatched file to see the output of this stored procedure.
I am wondering how to go about adding in another level. IE I want to have a tree view that started with SITE's that have Departments which have Assets. IE I want to add a grand parent to the tree view.
What would the sql look like for this.
I think you will have to modify the parentId values for the current root records and leave the SITE record solely with NULL parentId while the present six roots should have parent id which points to the SITE grand parent.

Resources