I Have developed a reporting tool using ms access. It is composed of 10 forms which allows the user to input data. I also allow the user to upload images to the database(images are uploaded to image folder and the link is store in the database table). The user could upload as many as 30 image files.
What i want to do is add another form which displays all the images the user has uploaded. Would this be possible in access i know in php you can use the mysql_num_rows function , just wondering is their a similar way to achieve this in access. Can anyone point me in the right direction ?
Basically when a form opens i want to run an Sql statement that retrieves all the images in the tables database and then shows the images on the form.
Using MS Access 2010:
\1. Create a continuous form, there is a wizard that will step you through. You can base the from on a table or query, a query is usually best. Ensure you include the field that holds the path to your image. You do not need to include the field with the path to the image on the form, it just needs to be part of the recordset.
\2. Add an image control
\3. Set the control source for the image control to the name of the field that holds the path to the image.
\4. View the form.
The continuous form can be a subform
Related
I would like to be able to include a link in a view on the contact entity of dynamics crm that will pop a custom window that we have built. The custom window needs the contact id and the user id in order to function. Our users have requested that such a link be on the view rather than having to go into the contact record itself.
So, is it possible to create a dynamic URL that will be utilized from the view and will be able to determine the contact id and the user id?
I would assume I need to do this with a web resource, but I've only ever used a web resource in an iframe.
I have tried to build a web resource and just use the web resource's link to put into a field and display that field on the view, but obviously that didn't work.
Essentially the link would build a url and then pop up a new window with that url. Here's my url structure: https://example.com/mscrm/ticketing/Activity/PhoneCallSave.aspx?cId=00000000-0000-0000-0000-000000000000&id=%7b00000000-0000-0000-0000-000000000000%7d&orgname=00000000-0000-0000-0000-000000000000&userid=%7b00000000-0000-0000-0000-000000000000%7d&type=contact&token=Zf7Hi3PFokqRn3RnTD6hPA
This is an interesting request that I have not encountered before...
I thought about using a URL-formatted field, and the fact that D365 by default will hyperlink lookup fields. But, with those options you'd have to write data into a field on each Contact or create an entire new record for each Contact, on the fly.
What about creating a separate web resource that contains a table with only one column to hold the dynamically generated URL's? Run the same query as the view to get the Contacts, then generate the URL's and populate them into that "mini-grid". Put the main Contacts view in one section (say two-columns wide), and the mini-grid web resource in a single-column section right next to it, with no border and the same row height.
This way you rely on the main Contact grid for the Contact info, with the mini-grid holding your dynamic URL's (with proper link names of course, rather than raw URL's).
The high-level steps would be:
Get the user's id from the form context.
OnLoad of the sub-grid, get the set of Contact Id's.
Generate the URL for each Contact.
Populate the URL's into the mini-grid in the same order as the Contacts in the sub-grid, so each row in the mini-grid lines up with its Contact row to the left.
Another idea would be to look into the custom icon functionality in V9 to see if there are any hooks in there where you can add a dynamic URL.
You could also write a RetrieveMultiple plugin to dynamically populate a URL-formatted text field. RetrieveMultiple plugins have their caveats. But, how bad is it?
An unsupported option might be to hack the DOM and put your dynamic URL into a blank URL-formatted field in the view.
I am building a simple admin-on-rest application. One of the features is the user to export the content from a list view. So far I have two possible approaches in mind.
Export based on the selected filters (my favorite).
Export based on the selected rows from the table using check boxes.
I guess two things are necessary to achieve that:
Be able to render a button somewhere in "list view": would be great to add an "export" button inside the "filters" section. I couldn't find a way to render an "export" button keeping the filters.
That "export" button would be able to get the filters (from the list view filter section) for creating my custom URL for downloading the data. Or if using check boxes, detect the selected rows from the table and export that data.
I have been looking for examples or following other colleagues questions and I coundn't come up with anything similar. Any info/example/project will be much appreciated.
This is quite solvable. The filter is stored in the redux form and can be accessed by any connected component. I am guessing you have an API endpoint available that you can ping with the filter data and that can then generate the file and respond with the file URL.
1) Write a connected button component. This should have a mapStateToProps method to access the current filter data
https://marmelab.com/admin-on-rest/List.html#actions
2) It should also dispatch an action that generates a POST request.
https://marmelab.com/admin-on-rest/Actions.html#using-a-custom-action-creator
IMPORTANTLY: You will have to think about how the file itself will get downloaded. Since you are generating the URL on the fly, it will not be embedded in the model data so you do not have access to it. You might have to hard code a file name and path into your components so clicking will always lead to a download. Though this is not as trivial as it sounds, as the file generation itself will be an async operation. I think clicking this button should lead to a redirect to a page where the download link is displayed.
Just to complement krunal's answer, there's a library called FileSaver that can take a json response and start a file save operation with its content, showing a file save dialog, or even download it directly to a file of your choice.
I would like to know how one can display image type BLOBs uploaded as per this stack overflow question Use of BLOB type column in Oracle APEX, as images in a classic or interactive report instead of the normal download links.
I noticed that you can change the blob column attribute's Content Disposition field to inline, which then allows you to click through to another page where the image is displayed; but I want the image to display directly in the report without having to click on it.
The inline image displayed in a new page has the following url
https://apex.oracle.com/pls/apex/apex_util.get_blob?s=34564408462&a=4794&c=16789110088070077&p=2&k1=21&k2=&ck=D4QFl4Z9txsufDbmUOmKeirK4&rt=CR
which suggests that one might be able to use apex_util.get_blob. Does anyone know how this can be accomplished?
I have implemented same in classic report.
I followed this link http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm#AEAPI129
This may help you to resolve your doubts
I'm using Apex 4.2 and Oracle 11.g.
I have a rich text field that is used to store the body of an apex-generated eMail using SMTP_MAIl. The eMail generation process works fine. But my users want to include an image (jpg, bmp, etc.) into the body of the email, and don't want to include the image as an attachment.
On the Apex page, the rich-text field is defined as a Rich Text Editor / CDK Editor 3 / Toolbar = Full / Toolbar Expanded = Yes / Skin = Office 2003.
The rich-text field writes to a BLOB column.
If I just paste in the image (Shift / Insert) and then go to save the rich text field, I get a 500 - Internal Server Error.
Can you provide some help so that I can include an image in the rich text field? Ultimately, this will be included in the body of an html_email.
Thanks for your help.
The nature of my problem seems to be related to the 32K limit per Apex page item.
A colleague told me to look for a plugin. I found Enkitec's "CLOB LOAD" plugin. https://www.enkitec.com/products/plugins/clob-load
The plugin works well. It's easy to install, and the directions are pretty clear.
I stumbled on a few things to supplement CLOB_LOAD directions.
1) The table item that the Rich Text will write to has to be defined as a CLOB (and not a BLOB).
2) You have to create a Apex Collection using Apex's SQL Workshop. Be sure to include the Begin and End. The directions reference this.
3) If you already setup the form Apex page using the Apex Wizard and the DML page process is there, The "Return Key Into Item" is empty. At least it was with my Apex Page (4.2). That prevented the "Create" button from working. Once I set the "Return Key Into Item" value to the page item that relates to the primary key column of the table, it helped.
4) I also had to copy the page process for the "Save" button suggested by the plugin directions and assign the copied process to the "Create" button. Once I set those two items up, the plugin worked fine for updating as well as creating. It's a good solution.
Using this plugin, I can place a JPG, PNG, GIF, etc. into the Rich Text field, and it will write it to the CLOB, even when the total page item is greater than 32K.
I am currently creating a multiple items form to show all the data I have, the interface will be similar to the one I have attached
This is in the design view. When I want to update the image for the selected record it updates the image for all records. Any suggestions on how I can update the image for each record individually? Or it is not possible to do it for multiple item form?
any other good suggestions?
For Ms Access 2007 and upwards:
The image control can be bound, you should set the ControlSource property of the image control to the field in the record source that contains the image path for each record.
For earlier versions of Ms Access (only works for single record forms):
You must set the image for each record in the Form_Current event.
Example function to be called (assuming the image control is called imgPhoto):
Public Sub SetPhoto(strPhotoPath As String)
Screen.ActiveForm.imgPhoto.Picture = strPhotoPath
End Sub