Getting column value from Browser - progress-4gl

I have one browser displaying customer details. When I select one row (ie one customer) in that browser I want to get the Customer Number of that customer.So that I can populate another browser "OrderBrowser" which will display the order of the selected Customer.How?

you should use a trigger
ON VALUE-CHANGED OF BrowserHandle DO:
your code
END.

Related

building a form with dynamic fields in progress 4gl

I am trying to display a list of open indents with check boxes before them each line. Based on the selection a report will be generated next with further details.
Table: xxind_mstr (xxind_nbr, xxind_shipto, xxind_askedby, xxind_date).
Is there any way that I can bring the records from xxind_mstr and place them in the FORM with check boxes ?
Note: This only works if dynamic. Never hardcode this approach.
Name each check box with the value of ROWID(xxind_mstr).
This way on the post you can read back through the each xxind_mstr getting the value of the the rowid.
Rod
I'd like some more info, just to know if I'm not talking rubbish here. You want to display the records in xxind_mstr as checkboxes, then upon selection of the report setup, fire the report respecting the checkboxes flagged? If so, then I'd use a browse pre-built with a temp-table containing the xxind_mstr records, and a "flagged" field, this being a logical view-as checkbox, and when they run the report, do a
FOR EACH ttxxind_mstr WHERE flagged = true, and you should have what you want.

How to use one filter on two separate fields at the same time

I am working on a Tableau visualisation of network data, showing trends in user behaviour.
I have a table with users (USERS) and a table with network messages (MESSAGES): Each message has a sender and a receiver from the list of users.
I have two worksheets, one showing trends of outgoing messages and one showing incoming messages. The two worksheets are placed in the same dashboard.
How can I create a filter dropdown containing all users from USERS that filters senders in one worksheet and receivers in the second worksheet?
I have tried to duplicate the MESSAGES data source and blend USERS with two different fields, but the performance is not acceptable. Any ideas are welcome.
Thanks in advance
Create a new parameter:
data type string
allowable values set to list
add from field - user field
Quick filter on user-sending
select condition tab, By formula
[user.sending]=[user.parameter]
Repeat for user-receiving sheet.
Lastly, right-click user.parameter and select 'add to sheet' (or add it to you dashboard).
You can do so by selecting the 'use all' option rather than using a range or a list. This works very well for dates especially as it shows a calendar and then you can pick the date you want to see.

apex tabular form icon link column

I am working with a wizard-generated Tabular Form column that needs to display an icon which launches a Javascript function and pass the row value into the function when clicked. The function launches a popUp2 window which sets the values of other fields on that row. So the row number is crucial, but it is always 0 for newly-created rows (in APEX 4.0.0.00.46). I managed to solve that problem by storing the rowNum of new rows into my Updated By column during AddRow.
What I have now is an Updated By column ("Lookup" Heading) which stores the row number of new rows, has onClick="javascript:usePopup(this);" in the Element Attributes which launches the popUp window function, and then gets any values under 2 digits wiped before submit. This fills the correct fields and submits to the table with no problem.
I can't keep using the Updated By column for this function, though. There are currently reports running on this table, so I can't add a new column to the table. I need a dummy column to display the icon, temporarily store the Row Number of newly created rows, and not mess up the MRU. It is f08, so the value of f08_0005 needs to be 0005. I tried making a null column with
select
"FUEL_USAGE_DETAIL_ID", ...
"EXPENSE_TO_PROJECT",
"EXPENSE_TO_TASK",
NULL Lookup,
"UPDATED_BY",
"PROVIDER"
from "#OWNER#"."FUEL_USAGE_DETAIL"
but that can't submit. I get the Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "01A949FAF0B3A91914ECACCDC9BBA9E6", item checksum = "B6ADF86455B14EF691B2AFB314926A0D".
Please help me create a null column to display this icon, store the row number of all the rows (including the brand new rows), and not mess up the MRU. If you need pictures of what I have and what I need, see my other thread: https://community.oracle.com/thread/3649771 Thank you!
Fractal65,
Do not add any null column in tabular form.
just go to>>Edit tabular form attribute make following change
you will get it position as f02_000X (x-rownum)
now uou can use this rownum value in javascript or anything.
Hope this helps.
I had a similar error with my last project. Do you have a none displayed row selector? Please try to delete it to see if it will work.

Display Records Horizontally Instead of Vertical in Cells, SSRS

I'm trying to display multiple values for one drive by adding a column for each additional record assigned to a drive. For example, a drive ID is unique but can have multiple promotional incentives assigned to it.
For example, if we go to a university on 1/23/2015, that will a unique event or record in the DriveMaster table, but if we are giving away T-Shirts and Pizza, those two records will be assigned to the drive in the EquipmentDetail table.
In SSRS, I'm trying to create a sub-report that will display the promotional items on one line instead of adding additional lines for each promotional item. See screenshot below.
What I'd like to have happen is have the each drive only account for 1 row, and each promotional item listed in a new column to the right. See mockup in Excel.
Is there a way to handle this? I know there is in Crytal Reports, but I can't figure this out in SSRS. I've tried using a Matrix, but I can't see to get the columns to grow if there are multiple incentives.
I added a column group on the Description field, and it looks like that it is close, but that the grouping will create blank spaces (cells) in it.
Thanks,
You have to set a Column Group for your promotional item in your Matrix.
Hope that helps.
Edit:
It looks like there are some areas that contain no data (because of your groupings)
We can do something like the following:
In your query you can use the 'over'
Select DriveID, PromotionItem, ... ,
ROW_NUMBER() Over(Partition by Select DriveID, PromotionItem, ... Order by PromotionItem)
AS ColumnGroupNumber
Then in the Promotion Item group that you have change the field it groups on to the ColumnGroupNumber (or whatever you are going to call it). Just don't change the field in the detail row, or you will not see the details.
I have used this solution before. I found it here.

Filemaker 12 -- display one value, store another

I'm building a database in FileMaker 12 that will, among other things, keep a list of jobs (indicated by numeric ID) and the employees who had billable time for that job.
Given three tables:
Employee ( empName, empID, salary, ... )
JobHours ( empID, jobID, hrsWorked, ... , refID)
JobCost ( jobID, expenses, profit, ... , refID)
Where:
Employee is my personnel roster matching names to numeric employee IDs and stats (salary, et al) ;
JobHours is a list of employee participation -- whenever an employee spends time on a job, this table has a line that shows their ID, the job ID, hours worked, and a few other things;
JobCost is a daily record of jobs. One entry in this table refers to the activity for a single job on a single day. Additionally, each entry gets a system generated unique ID (since neither jobID nor date is unique) to relate to JobHours (resulting in a list of who worked on a particular job on a particular day).
I have a form showing records from JobCost. For each record, I can see in a portal, showing records from JobHours, who worked on that job on that day.
Now, the issue.
In my portal, I want to have a drop-down list of employee names pulled from a value list to create records in JobHours with the following criteria:
1) I need it to be a drop-down rather than a pop-up so it will respond to auto-fill from the keyboard. A drop-down will show the secondary value (employee name) from a value list while dropped down, and will respond properly to keyboard autocomplete on the secondary value, but once you've made your selection, it only displays the primary value (employee ID).
2) I need it to display names, not IDs, at all times. The pop-up does this perfectly. However, it doesn't seem to respond to the keyboard for typing autocompletes.
3) I need to store the numeric ID rather than the name.
I know how to satisfy any two of these criteria at once, but that's all. The whole database is working beautifully otherwise. Is this behavior possible?
One common technique is to use two fields, one directly on top of the other.
On the bottom, put your JobHours::EmpID field. Set it up as the drop-down list with the value list that you've specified.
On top of the JobHours::EmpID field put the related Employee::EmpName field. Set the field so that it cannot be entered in browse or find mode.
Now your users will see the Employee Name, but when they click that click will go through the top field and into the Employee ID field where they will choose the name from the value list.
pft's solution is one that I have long used, but I do still find it inelegant because the user still sees an existing id number in the field when changing the value.
If the type-ahead is important, I would use the popup menu. Once the menu has been activated either by tabbing into it or by clicking into it, the user is able to type from the keyboard and the selection will change based on what's entered.
I came to this thread looking for a solution to this same issue (allowing the user to pick from a list, show their choice, but store a related value instead). For example, choose a plant species name from a dropdown, show the plant species name in the dropdown field, but have it store the taxonomic serial number (TSN; which is more likely to stay the same over the years). This is easy to do in MS Access, but took a litlte more messing around to do it in FMP12.
How I solved it:
I created two fields in the table that would be storing the values: Plant_TSN and Plant_SciName. A relationship must exist between the values in these two fields. In my case, I store a SciName for each TSN in a lookup table. I then created two fields in my layout, one for each new field.
For the value you wish to store (ex. Plant_TSN):
Make the corresponding layout field a dropdown and include the show/hide arrow. Edit the value list you will populate the dropdown with to show the second (reader friendly) column but store the first column value. In the layout shrink the field to only show the arrow.
For the field you wish the user to see (ex. Plant_SciName):
make the other layout field a Edit Box and prevent field entry in either Browse or Find mode. But it up against the dropdown arrow created in the previous step to make what looks like one field.
Finally, back in the first field (arrow-only drop down) write a script to push the user friendly number (Plant_SciName) to the edit box when the user-ugly (Plant_TSN) value is picked in the drop down. I used the OnObjectSave script trigger of the dropdown formatted field. Script should be something along the lines of 1) Freeze window, 2) Go to Related Record (based on relationship in lookup table 3) Set Field (i.e. the edit box) and 4) GotoLayout[original] to offset the Freeze.
Probably not an entirely clear explanation, but I bet you will get it on your third read through! I would have posted a screenshot, but I apparently need 10 "reputation points".
Cheers.