Reading Mail Merge Field Using Aspose - mailmerge

While reading mail merge field using Aspose Words I got incorrect result for fields like {MAILMERGE Country Name}, it is only reading it as Country and not as Country Name.
An older version of Aspose was actually reading the field as Country Name. The newer version reads that field as Country Name only when we do {MAILMERGE "Country Name" }.
Can anyone point out on standard practice on creating the mail merge field and if we have any library in Aspose which would read the tag correctly even without quotation marks.

Related

Dynamics 365, Entity View, format date field to "Month Year"

I am working on an entity view that displays billing records with associated date. This date field needs to be displayed as "Month - Year". Unfortunately, I am not able to find a way to format this date field outside of modifying the entity and even then, I only have the option for date only or date and time.
I have noticed that I can select the field and click on Change Properties. There I have "Web Resource" and Function Name. I have tried creating a web resource with a function that returns some data. Set everything up, saved and published. This function is not even found in dev tools. Only examples that I have for it are dealing with using this method for icons:https://www.c-sharpcorner.com/article/view-customization-with-javascript-in-dynamics-365/
In another example the suggestion is to use calculated fields, but this would cause me to lose date sorting and filtering on the form.
That view-based JavaScript seems to be to choose an icon. I'm not sure it would allow you to reformat actual data in the view. And if you're looking for assistance with trying to do that, you'd probably get more help if you posted the code.
Besides the JavaScript approach, you might want to think about creating a separate text field to hold the "Month - Year" value. Then you could use a workflow, plugin, or JavaScript to populate it when the datetime field changes.
One of the free workflow tool packages (Jason Lattimer's, Aiden Kaskela's, or Andrew Butenko's) probably has the ability to parse the date so you can format the month and year, and store the string in the separate field. This would be a no-code option.
Alternatively, you could write a plugin to reformat the datetime values and register it on the RetrieveMultiple message of the entity.
I'd probably go with a separate field and an off-the-shelf workflow utility to populate it.
There are several ways:
1. Setting->Administration->System Setting->Format->Customize,
2. http://prntscr.com/ph42nc,
3. or use on load with js to change date format more on this subject here: How to change date format in JavaScript

csv parsing issue when data include comma

I am retrieving data from DB and make each field merged with Comma between them to generate CSV.
But the problem is one the field is Company Name and the data includes comma which leads to malformed CSV file.
Example: Name, Telephone, Email
AAA, 12345, aaa#mail.com
BBB Co,.Ltd, 43466, bbb#gmail.com
For the record BBB the generated CSV becomes problem as it includes , in the data.
How should I make the correct CSV for such records of including , ?
Most of the developers handle this situation by using different characters instead of "comma". But i would suggest you to look into an old post here
Dealing with commas in a CSV file
Is your question related to Salesforce APEX?
When the CSV was generated there ought to be an option to enclose the fields in Double quotes so that commas can appear inside the field content. For example "Company, Name","1234","etc."
The CSV generator will also "escape" any double quotes inside a field like this "Some field with \"double\" quotes","123","etc"
This all means you need a CSV parser that can handle these situations.
If your question is related to Salesforce APEX then it is quite difficult to build such a CSV parser because of the limitations Salesforce imposes on the number of statements that can run in any given action.

importing csv (magento)

I have a certain attribute dealer_country in my website, which is a dropdown attribute containing a list of all countries. However, in my csv file, the dealer_country attribute will be containing country codes(in 2-letter format). Would it be possible to import with this condition?
Yes. There is an easy way and a hard way.
If programming is your bag then you can get your attribute hooked up to the Magento country codes and have it return country names on the front end.
It would take a while to write such an ideal solution. However you can use a 3rd party import tool like 'Magmi' to get your products in without having to define your attribute values first.
Once in you can edit your attribute entries for country and, in the second column put the country names to be shown on the front end. e.g. for 'GB' in column one you have 'United Kingdom of Great Britain and Northern Ireland' in column two. Or for 'LY' you can add 'The Great Socialist People's Libyan Arab Jamahiriya' for column two... Oops!
http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Main_Page

How to fetch data from a text file to a vb6 form

I have a text file in which the names of the students occur at various places. There is the text "names" and then the name of one student following it. Similarly, at another place this text, "Names" appears with the name of the student following it.
I want to fetch the name of the student one by one. That is, the first name is to be fetched and then I do some operations. Then after these operations I have to fetch another name and repeat the same operations.
How do I fetch the name of the student one by one and put them in the text box located in the vb6 form?
How to read a text file line by line:
http://www.dreamincode.net/code/snippet318.htm
Look at using InStr to find a value in the string read in.
http://www.aivosto.com/vbtips/instr.html

data validation for date data type in unix?

for eg if i m getting various inputs from keyboard ie
Book accession number,
Subject code Book_id ,
Author ,
Year of Publication,
Title of the book,
Publisher’s name,
Price,
and i want do validations such that
year of publication must be before 1996,
Book_id must be unique,
Publisher, Author and the title of the Book cannot be entered blank,
Subject code can only be either UNIX or C,
The Book accession numbers must be in ascending order,
how do i store all values first and do validations for data types like date
I guess it would make more sense to put this stuff in to a database. Then create a select. In shell programming it's also posible, but would create a lot of work and it could get a bad performance.
Using Perl is another good option since it has date modules in it, and it's faster. If you don't have DB access.

Resources