Why is my 4D Write document not saving with the rest of record? - 4d-database

In 4D, how do you guarantee that a 4D Write document is saved with the rest of the record?

I know, I'm late. If you want to save your 4D Write automatically, then create a field in the table you are modifying with an underscore as last character.
Your 4D Write area name: myLetter
Your table field name: myLetter_ <-- the 'underscore' is the secret
And as soon as you hit ACCEPT, 4D will save it together with the record.
If you are using SAVE RECORD, that's the hard work. In the line before the SAVE RECORD you need to transfer the 4D Write Area into your field:
[TableName]myLetter_:=WR AREA TO BLOB(myLetter)
Save Record([TableName])
Peter

There is a difference between ACCEPT and SAVE RECORD ([table]).
When saving a 4D Write document on an input form, you need to use ACCEPT.

Related

Identifying AEM Content Fragments related to a particular field value updated in a csv

When a Content Fragment is updated by drawing values from a linked csv file, is there a way to identify only those CFs that are related to the particular field value, updated in the csv file?
Suppose we only update the income for Year1 in a sample csv file (row: Income, column: Year1) and this csv may be linked to a number of CFs but I only want to find the CFs containing the particular field value updated, that is income for year1.
I initially thought this would trigger an event for the CF updated as it would have for any other update that we do to CFs directly but in this case an event trigger is not happening possibly because it's drawing values from an updated csv file.
What would be a possible solution to this problem?
There is more than one way. In general, it depends on how you upload the csv file in AEM.
You can implement an event listener to monitor changes in the csv file. If it is updated, you can take the path from the event data, parse the contents and update the CFs.
If you are updating the csv file via Sling Post Servlet, then you can implement org.apache.sling.servlets.post.PostOperation and put the logic in it.

How to Search Access DB and Make A DB Wide Search & Replace Operation

we have an access database. We had been using http://www.example.com on various data sections. Now we want to search this URL and replace all occurrences.
I am not sure if Find and Replace utility works in this case. Because Look in field is set to Current Document but my search does not bring expected results.
The goal is only changing domain name so any URL that starts with http://www.example.com will be updated and URLs will start with http://www.newexample.com
One thing that comes to my mind is exporting 40 tables as CSV and doing the operation via Notepad++ and import the resulting CSV file back to database.
In the Find and Replace dialog, make sure that Match is set to Any Part of Field.

SSIS Flat File Connection - How does it determine string column DataType?

I am creating a new Flat File Connection Manager SSIS component which is based on a CSV file. I am keen to have the columns (all 547 of them) to be of type Unicode string [DT_WSTR] rather than string [DT_STR].
I am not sure how to trigger this component to do this automatically.
I guess I could go through and manually change each every one of the 547 columns to this data type of Unicode string [DT_WSTR]
Any comments or answers much appreciated !
I have tried using the Unicode checkbox but the wizard then doesn't find the columns. I get message "The specified header or data row delimiter "{LF}" is not found after scanning 2097152 bytes .."
I was hoping there would be some way of changing all the column data types in one action without having to make 547 column type changes.
You can simply open the Flat File Connection Manager, Go To Advanced Tab, Click on one Column, Hold Ctrl key and select all columns then change the data type to DT_WSTR.
Additional information can be found in the following link:
SSIS: Flat File default length
I found an answer to this question.
https://social.msdn.microsoft.com/Forums/en-US/747ad564-1add-422e-af3c-9375b130ec83/easy-way-to-set-all-data-types-in-a-connection-manager?forum=sqlintegrationservices
i.e. In the Flat File Connection Manager Editor it is possible to select multiple (or all) the columns and then the DataType choice made is applied to all the selected columns.
Phew !
i.e. like this:

Value is repeated after copying it from Access and pasting it into Notepad++

I open a table inside the GUI of MS Access. I mark a cell which contains:
Myriam
I hit ctrl + c to copy it. I open a new document in Notepad++ and copy with strg + v. The result is:
"Myriam
Myriam"
I get two lines instead of one! There are 27 thousand entries in that column and ONLY for this one I observe this behaviour. I was able to track it down to this level, but now I'm clueless about the 'why' ... ?
Using the "Zoom" feature (ShiftF2) in Access revealed that the field actually did contain
Myriam
Myriam
This was probably due to a user accidentally hitting CtrlEnter during data entry, which added the newline and made the field look empty, so they typed the name in a second time.

Access New ID Field YYYYMMNN [duplicate]

I need to automatically generate a 12 character value for my Business Key. Without any user interaction.
8 character -> Today Date (yyyymmdd or ddmmyyyy).
+
4 character -> Sequential Number (0001,0002,0003).
The Sequential Number must reset on each new day.
Is it possible to do this in Microsoft Access 2010+ without any coding involved?
Since you are using Access 2010+ the best way to accomplish your goal would be to use a Before Change data macro like this
To create the Before Change macro, click the "Before Change" button on the "Table" tab of the ribbon when the table is open in Datasheet View:
For more details on Data Macros see
Create a data macro
Good question, thanks for the challenge!
After some search, it seems it's possible to do that.
You can prefix the AutoNuber value by processing like the explanation available here: http://www.databasedev.co.uk/add_prefix.html
You can try to specify in the format of the field a format(now(),"ddmmyyyy").
Check this page for more informations, another user seems to have the same problem and got a solution: http://bytes.com/topic/access/answers/695188-custom-made-autonumber-show-todays-date
Hope it's helping you!