How to update Accumulo visibility label? - accumulo

We have a scenario in which we need to update Accumulo visibility labels. My understanding is that visibilities are immutable. Should we make a copy of the item assigning it the new visibility label and then delete the old one or is there a better way?

Visibility labels in Accumulo are intentionally immutable. You can insert new entries and delete the old ones, or you can extend the TransformingIterator to convert your old visibility labels to new ones during a major compaction (test with the scan scope first, or test on a cloned table).

Related

EffDated branches on policyPeriod and saving arrays

I have an array that is saved on the policyPeriod level right now called listOfAdditionalInsured. This list is display on one of the pages in the UI in PC.
The issue that I am having is that each time there is a policy change it will erase the data on that list because it's on the policyPeriod level. I see other arrays in PolicyPeriod that are not deleted during policy change and will appear fine. They look like they are effdated entities.
I am new to this so I am trying to figure out how to keep an array on the policyPeriod level but let it be editable during a change. I have tried putting it on the Policy level but it will change the array for all the transactions if I do it that way. I want each transaction to be able to edit the list in its own way.
Make sure your array entity is an Effective Dated entity and that the effDatedBrachType is PolicyPeriod. Take a look at how PolicyContactRole is implemented and try to do the same.

Update only some attributes of an entity

I'm new to Core Data and I would like to update only some attributes of an entity that may or may not yet exist in the store.
What I'm currently doing is inserting a new entity with only a few fields set, but afterwards I find that the other attributes have been reset to nil on entities for which those attributes have already been set.
I am using a merge policy of NSMergeByPropertyObjectTrumpMergePolicy which I believe would overwrite only the attributes I have set on my latest update.
I would like to avoid a complicated approach of first obtaining the entity, and then doing a field-by-field reset using old values.

Why am I getting duplicate lines when inserting and updating a new row?

I am generating a production order and inserting material lines. When creating them, I have to set some extension fields. To get to those fields, I need to perform a graph.view.Insert(row) action. After, I can access the extended fields. After setting all of the extended fields, I need to perform a graph.view.Update(row) so that those values are set in the cache. After I am done, I perform a graph.Actions.PressSave(). When I execute this and navigate to the details record, I see two lines for each detail instead of just one. I've noticed this happening on any grid I insert a record into, set values, and then perform an update before saving. Is there any reason for this?
Here is some example code of what I'm doing:
AMProdMatl newMat = new AMProdMatl();
//Set values
graph.ProdMatlRecords.Insert(newMat);
AMProdMatlExt newMatExt = newMat.GetExtension<AMProdMatlExt>();
//Set extended values
graph.ProdMatlRecords.Update(newMat);
graph.Actions.PressSave();
The result:
I want to emphasize again that I've run into this issue in other sections of Acumatica and I don't think this is a Production module exclusive issue.
Make sure you are using the return of the insert and update statements before reusing the row in additional statements.
For Example:
newMat = graph.ProdMatlRecords.Insert(newMat);

Restrict User input for PXSelector and use it only as a lookup

I have a case in my customisation project, were I have a PXSelector that I want it to solely act as a lookup, and would not like the users to input any data via the selector and create new records.
I could not find a way to limit this from the attribute itself, therefore I tried to limit it from the events that the control fires. The idea was that in the FieldUpdating Event I would verify whether the value inserted by the user can be found in the selector's key column, if not I would revert it back to the old value. The problem was that cancelling the event had no effect on the selector and since I did not know what the previous value was, I could not revert it back manually.
It sounds like you are trying to use a filter. You need a PXFilter view which then could be used to display data in a grid for example.
You can search the source for "PXFilter to find good examples. One I found is APVendorBalanceEnq which uses public PXFilter<APHistoryFilter> Filter
PXFilter views are not committed to the database. Typically you would create a new DAC for the filter based on your needs but you can use existing DACs that are bound to tables without the fear of the data making it to the database. With the filter you simply use the field values rather than load records into the view.

Automatically update AddedBy and EditedBy fields in SubSonic

I have a data model that includes common columns like addedBy, editedby (user), addedDate, editedDate.
Is there a setting I can use in SubSonic 2.1 that will automatically update these fields appropriately instead of having to explicitly specify in every update?
Check out http://subsonicproject.com/setup/subsonic-conventions/. SubSonic uses a convention-based approach when it comes to audit columns. If you can change your column names to CreatedBy, ModifiedBy, CreatedOn, and ModifiedOn respectively, then they will be updated automatically. I don't think there's a way to change what those names can be without making changes to the SubSonic source code.

Resources