Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Tuesday, January 3, 2023

Data Extraction Help for Rich Text Field

Preamble:

This post is being written more for my long-term memory benefit than for its genius of development.

A customer wanted to export their data from an NSF to import into Salesforce.

They thought they could just export the view.

Sure, if the view had all the data, which of course, it did not.

Thus how it ends up in my inbox.

Action:

I created a view and proceeded to add a column for each field in their form.

No problem, done this many times.

When I verified the data before giving it to them, I found it was missing one field.

For unknown reasons, one can not see rich text in a view column even when specifying the field. Oh, and you can't specify a rich text field, either.

Developer friends are shaking their heads, they understand, but us admins, we figure it should just work, right?

Work Around Solution:

UPDATED EDIT: Thomas, in the comments pointed out, rightly so, that "Rich Text items can contain not only formatted texts, but tables, images, file attachments and more. But the abstract item will only contain the unformatted text." 
In this case, my client only has some textual notes in the field, but if they had other items, you should seek a proper developers help.

This is what I did after mentioning it in the openntf.org Discord chat, where I learned about the @abstract formula.

I used Jake's blog post, from 2001, http://www.codestore.net/store.nsf/unid/DFOU-4PRG73?OpenDocument, as the guide. But that was only one part of the story, and I had to fix the code.

Jake wrote: First thing to do is to create a Computed field, of type Text, and call it something like "Abstract". The formula for this will be somthing like :

@If(@IsAvailable(name_of_the_rt_field); @Abstract( [Abbrev]; 200; ""; "name_of_the_rt_field");"" )

Jake included a * at the end of the formula. My designer client balked at it, so I removed it, and it accepted the code as shown above.

I added a field to the original form, called it Abstract, and set it to type Text and Computed field.

Then entered the formula, substituting the name of my Rich text field, where Jake wrote name_of_the_rt_field.

I also changed the 200 to 2,000, so I could get all the text in the field. 

Saved it all, refreshed my view, and ..... nothing.

2nd Part Work Around Solution:

Further Googling found that the rich text field would only show up now if it was resaved.

I tested this, and sure enough, I resaved a form and magic, the rich text was shown in my view.

Great, but, I can't re-edit all 1,500 documents, nor know even if they have anything in the rich text field without opening it, so what do I do?

I asked Bruce Lill what he uses, and he said to create an agent, with a Forumla and a target set to none.

The formula to include is @Command([ToolsRefreshSelectedDocs])

And after saving it, selected a few forms and ran the agent, and now the rich text shows up.

And I can give the client their data for importing into Salesforce.

Conclusion:

Domino developers have dealt with this for many years and created workarounds for it. Admins have just lived in pure ignorance all this time about this issue.

Thursday, March 26, 2015

Time Travel the Daylight Savings Time Way

Over here, we change the clocks tonight. It is a random event decided by the government.

But that is not the point of this blog post.

Governments suck at understanding technology, be it farming or digital, they should just stop messing with us.

But I digress.

While working on a client site I noticed that the log file view shows a time, say 9:45am-10:02am.

When you open the document, I saw 8:45am times.
Please be aware this will not hurt your server in any way as it is a client side view issue, not a server side issue. Well, in this case.

Whoa! Daylight Saving Time issue! DST sucks!

Hang on a second. I am in Israel, +2 of GMT, customer servers are in EST.

My admin client of course runs local time for me. I am used to seeing log times in funny ways but this bothered me. I checked the server console, time stamp and date is correct. We checked the OS itself, also correct.

In a Skype chat with some friends, I posted the issue, this was an AIX server by the way, I also posted this Technote # LO68032 from IBM which describes it perfectly well.
http://www-01.ibm.com/support/docview.wss?uid=swg1LO68032

Unfortunately it states "This APAR is closed as FIN. We have deferred the fix to a future release."

And not in the 9.x stream.

I tried other servers at the same client, same problem.

I then tried other customer sites, no problem.

While discussing it with Susan, she advised that it would not be a problem after this coming Monday based on the historical dates for the time changes. Kudos to Susan who is always helpful and up to date with information. Note to her boss, you do not pay here enough!

The work around is to change the OS to EST then restart Notes and that works. 

However, I am interested in what caused it and how to fix it.

It occurred to me that this was the only client I was using a specific CISCO VPN and client (5.0.07.0290) which I do not use for any other clients.

It would seem to me that the problem lies not with IBM, Notes or Domino but with the VPN from the customer and the settings or policies it enforces when I login to it.

So maybe IBM should revisit that technote and customer and see if a VPN was involved. In the mean time I am opening a ticket at the customer site...after Monday if it still happens.