In a traditional notes form, I want to compute an image dynamically. Image is in another database's image resource in the same server.
I have tried using pass thru HTML by computing the URL in computed text. Its working fine in web. But I need to show the form in Notes Client. I am using the client version 8.5.2.
In computing URL I have tried using notes:// instead of http://. Still no luck.
If anybody help me to find out.
Thanks in advance.
It appears the computed image resource doesn't like implied text construction, I tried to do exactly as you building the image string and it kept failing until I did this:
#Text(#GetField("from") + ".jpg")
I used a combo box "from" to test with "refresh on keyword change" to simulate a new value. The images changed beautifully and the resource was selected from a different database.
One thing to watch for, that I was unaware of, is if you create an image resource and import a .bmp (bitmap) image, it's changed to an .jpg. This could mess you up by trying to reference a non existing image.
In short, a computed image resource from a different database will work.
While inserting image resource you can select the database from which the image needs to be loaded. So when you go to "Create > Image Resource" you can select "Database" field and then the images in that database.
All you need to do is insert an image resource. Place your cursor on the form where you want the dynamic picture, right mouse click and select "insert resource". Once the "Insert Recource" dialog displays select the database where the image resources are stored and the select the "Images" Resource type. You will have to select an image, probably make it your default image and click "OK".
Next, click on the image to give it focus and then either do an "alt + Enter" or right click and select "Picture Properties". When the picture properties display you'll see at the far right of the "Source" field two icons, select the second "#" for the formula window, this is where the magic is done. You'll see the current image name is already there. All you do now is create your #If statements to change the image name, no paths just the image name, the resource is already tied to the database where your images are stored. This has been long but actually implementing is quick and simple. enjoy:-)
Karthick,
I'm not sure if this is your issue but remember the order of how your form is processed, left to right and top down. If the field with your empcode is positiond after the image resource, the formula won't see the field value, unless you do a refresh. I used a field that contained the value to check to switch my images and that worked. Have you tried #GetField("the field name") to return the value?
You can not do it in direct way. You can neither compute the database nor pass the other db's image url. When inserting resource, it will ask for database name. if you choose the name as "a". Then the image resource will adopt to the database what you have chosen. It will take the images from the db "a". It will not take the image from current DB. So you just pass the image file name simply.
Use formula like this.,
#If(#GetField("pic")="1";"spinning earth.gif";#GetField("pic") = "3";"logo.jpg";"attach2.jpg")
The mentioned three picture is coming from different database but same server. If you want to fetch the image from current db then use another image resource. Make hide when. squeeze your brian.
The computed image resource as described in the other solutions will for sure work.
The only "problem" is, that the designer wants to get a text pointing to a valid file when saving the form. Otherwise it will render the image unusable.
Knowing that and knowing, that field- values are considered empty in the designer client, you have to "wrap" your result in an if- clause, or break out of computation, if the needed field is empty. Your first line could look like:
#If( FieldWithImageName = ""; #Return( "myfallbackimage.jpg" ); "" );
After that you do your computation. designer will fallback to the fallback- image, and the client will compute the image based on your formula, if the field that you refer to is above the image (you know: left to right, top to bottom computation of forms)
Another thing to notice: in earlier versions of Lotus Notes the image just scaled to its own 100% size, when you seleced 100% in the image properties. But in 7 (iirc) this changed, and all images are displayed with the number of pixels the image in designer was stored. If your fallback- image is 100x100 pixels, then every image will be squeezed or stretched to that extends. So better be sure, all images have the same size.
Related
I am trying to write a DocuSign integration where a customer uploads a PDF file and sends it to a list of signees. The customer should not have to place the right amount of anchors in the document. Instead, a new page (or several pages if necessary) for signatures should be added to the document automatically, with one signature box per signee. I want to avoid modifying the PDF myself. Is there any way DocuSign can do this for me?
The easiest and best way to do this would be to utilize anchor strings, which you've mentioned above that you would rather not do. Normally under these circumstances I'd recommend using a template, however you've indicated that you want the customer to be able to upload the PDF, correct?
The issue there comes down to document dimensions. If you were using a template, the coordinates for a tab would be stored in the template and be applied automatically. If your customer is supplying a PDF, you don't have a guarantee on how small or large the page dimensions will be. IE: An image taken with a Retina display vs. a 6MP camera would be like a Post-It Note vs. a calendar. The remaining option would be to find a standard set of coordinates that would work. For example, when a customer upload a new PDF always have a signature or initial tab applied at x/y: 0,0 so it will always appear at the top left.
Alternatively, what we would normally recommend is that the customer add in a unique identifier like /signer1signature/, then apply the tab via anchor string where it will be applied at every instance, even if it's a single instance hidden on the signature line.
I'm trying to read the contents of a "list view" using automation. The first time I navigate to it, I'm able to go from item to item, getting the correct text for each list item. However, when I display a different screen (which is apparently reusing this display object), the text on the screen is different, but automation gets the same text as the first set. From then on I can only get the text for the first view I looked at. It's like the text is being cached and I'm only able to look at the cached view. UISpy, however, seems to grab the right values every time, and if I use it while my automation is paused, I end up getting the right values.
In my automation, I use Find to grab the header, and walk the tree to the List View and get the text for each element. I thought if you used the Current property, you got the live data. Apparently I was mistaken. How do I either refresh the tree or get the REAL data?
Yes, the Current property on a certain AutomationElement will return its current, 'live', value. UIA will not cache anything automatically, you'll have to declare it yourself and explicitly access the Cached properties.
What's probably happening is that the new tree items you're seeing after selecting a different screen, are actually re-created (and that actually makes sense, UI-wise), not just updated. You could easily determine if this is the problem by selecting the first screen and writing down the tree items' RuntimeId property (you can see it in UI Spy). Then, select the second screen and check if the RuntimeId has changed. If it has, then it's just not the same object instance.
If this is the case, all you need to do is get the items again. It'll be easier to do this using AutomationElement.FindAll with a ClassName property condition.
Using Lotus Notes designer I have created a form and added a field on that form that does a #DBColumn look up. The form then is viewed through the web browser and everything worked great.
I proceed to add another document to the database using that form, now the original documents still render in the browser fine but the new document doesn't return anything to the field.
I tried removing the #DBColumn look up and just displaying text but nothing I just get 0.
The weird thing is if I rename the field to something diferent everything works perfectly but then if I rename the field back, broken, no calculation.
Does anyone know why this is? It has happened to me with various fields through out my application. I originally thought maybe it was a reserved word thing but I now know that is not the case. I usually just rename the field and move on but there has to be an explanation. Is it a caching thing or what?
Thanks for the info!
You haven't mentioned the type of your fields Is it 'computed for display'? If you have computed for display fields in a form, and the documents already contain data stored in an item with the same name, then the computed formula is bypassed and the item value is displayed as-is.
Fields not calculating could be a caching issue. Try opening the form, edit mode, F9 to recalculate all fields.
If this does not help, close the form, press Ctrl+Shift+F9 to forcefully refresh all views in the DB (could take some time). Reopen your form, edit mode, F9. If the value shows up, try using the "nocache" parameter on your #DBColumn.
Depending on your application design, there could be a number of reasons for the problem. Perhaps the view used for lookup is not set to autorefresh or the server does not refresh often enough because of high load issues.
I am appending 20 images in form by using loop.when i am scrolling these images up and down i want selected image index so that i can view bigger size of selected image.
i used this form.append(image)
is there any method or way to get selected item index in form like in list there is getSelectedIndex.
plz help me and provide me gud solution ..
The APIs for javax.microedition.lcdui.Form don't provide a means to get the selected item index, most likely because it wasn't designed for that kind of use. For the use case as described in your question, the correct approach would be to use javax.microedition.lcdui.List. In addition to determining the selected item, List also provides other useful APIs such as setting a select screen command for the items in the list.
I would like to add a field to a list with displays an Image, but acts as a hyperlink. In other words like the "Hyperlink or Picture" column, but "Hyperlink AND Picture" instead.
Where the two fields you input would be the URL to the image to display, and the URL of the hyperlink.
This must be possible. I notice that the Type (in a document library) column does just that, and also includes the views that are currently being used (in the case of a folder).
Is it possible to duplicate the computed Type field in a document library to read two other fields in the list (which will act as the image url, and the redirect link)? What would the CAML be?
Thanks in advance if anyone could offer any insight.
Arnhem
This can be done but you would need to develop a custom field type. As you have found, SharePoint's default rendering for pictures is without the hyperlink. You need to change how the rendering behaves in Display mode in your own custom field. Check Patterns in Custom Field Rendering for more info.
There are also several examples of creating custom field types on the web. The MSDN articles give a lot of detail about how it all works but don't let that put you off as it's not too tricky.