I am not able to apply conditional layout to a particular user/group field but can do it manually for any user - archer

Please refer to the images attached.conditional layout 1
conditional layout 2
The [User who is applying for leave] field is a user/group field which gets populated with the record creator by default. The problem is this layout only works when I manually select a user. Then the particular user selected can see the layout. The layout doesn't work when I select the field i.e. the user/group field. Is it that Archer is not able to capture the user from the field and therefore the layout is not visible to the user? I am not able to understand.

The field [User who is applying for leave] is autopopylated. From Archer standpoint it is a calculated field. Calculated fields are recalculated and saved when record is getting saved.
When Archer applies actions for conditional layout for new record the field [User who is applying for leave] is not populated yet, therefore Archer applies actions as if the field was empty even if you see it populated on the screen.
I suggest you to modify layout actions in a way that all users (or specific group) can see fields/sections when record is new, and after record was saved for the first time you can restrict security based on the value of the saved fields.

Related

RSA Archer - Calculated field based on Record Permissions field

I would like to have a complete copy of a Record Permission field.
For example - I have a field "OWNER" which is Record Permission type.
I want to create another field called "OWNER_COPY" which will always include the value which was selected in the OWNER field.
I thought of few ways to do so but none succeeded:
Crete a new Record Permission field (OWNER_COPY) but it has no option to be calculated (it doesn't have the option: "Set the value of this field using....")
Create calculated Text field (OWNER_COPY)- but if I'm writing [OWNER] in the formula it will provide the ID of the value and not its name.(e.g. if the owner was "Oliver", I will get his id - "123"" in the "OWNER_COPY" field).
Crete regular Text field (OWNER_COPY) and add a rule. but I couldn't find any kind of rule which can fit this case.
Any suggestions?? Thanks in advance :)
Archer can't copy value of RP to anther RP.
I used a custom object for this purpose. The limitation is that the field will be populated only when end user actually interact with a form. The good thing is that the field will be populated instantly.
As an alternative you can use a data feed as Tanveer described above, but in this case there will be a delay between the time when you save the record and population of the 2nd RP field.

How to handle search for custom fields in form for FROM and TO fields?

I have just started implementing search module in a project, where I have a form with fixed fields consisting of combo box, text box, radio button etc (around 200 fields in multiple tabs), and later client should be able to add extra fields too. Once user fills the fields which he wants to search, that search criteria also he should be able to save. For all these reasons, for each field I am associating metadata in the following format.
"EntityName.attributeName": attributeValue
Once the user fills the form fields to search, I will validate form data and and only non empty fields metadata I am sending to server in JSON format. Everything is fine till now. But I am facing an issues now.
Using the metadata of each field I will create a new criteria for each field. but if there are fields where one field metadata depends on other field metadata I am struck.
In the form I have few special category fields in following format : for example DOB,
FROM DATE (meta data: entity1.dob)
TO DATE (meta data: entity1.dob)
both fields belongs to same entity and same column only field name in the UI is different
Like this I have around 20 fields which asks for FROM and TO to query the range (it need not be on date, for example no of bed rooms..it can be on integer, string etc)
My query formation should be in the following way depending on user search criteria. If user entered only FROM field of number of bed rooms then I have to query using EQUAL to operator in sql and if both mentioned then MORETHANEQUAL to for FROM field and LESSTHANEQUAL to for to field. So how I can handle this special case ?
like if he entered number of fields as 4 in TO field of number of bed rooms, then I have to query for houses having number of bed rooms equal to 4. but if in FROM he entered 3 and in To if he entered 7 then I have to query for houses having greater than or equal to 3 bed rooms and less than or equal to 7 bed rooms.
Since I have same metadata for these category fields also I am unable to proceed, to achieve this, what kind of metadata I need to prepare ?
How I can generalize this process to handle all the cases ?
my technology stack: ExtJs, Eclipse Link, spring.
and what are the best practices to follow to support custom fields adding feature in Forms in enterprise applications ?
Off of the top of my head, I would create wizards for these particular cases. So for example, have a custom wizard that allows the user to define a "from" field, a "to" field, and then the comparison operator in one action. This wizard could also be responsible for adding custom properties to the generated fields that could be used by your validation routine. So based on the combo of from, to, and operator, you could create a flexible validation mechanism for ensuring that correct values are entered, ranges are correct, whatever.
You might consider this "wizard" approach for all custom fields, in fact. I could see you predefining all the possible custom field types that could be used and create classes that can be used for those. The classes could be responsible not only for the field creation, but also for providing any custom validation, pre-submit transformation, etc. This approach would make adding new custom field types incredibly simple since all you'd have to do is follow the same implementation as the others that already exist, extend an existing one, etc.

InfoPath 2010 NaN

I have been trying to update a text field in a form that will automatically generate a new number in a read only state when a user fills out the form. When the user completes the form and selects the submit button, the form will be attached to SharePoint List and the following user will open the form and the number field will be the number +1. I have used 'count(mynumber)' and the field returns 1, but when I close the form and re-open it, the field still displays 1 and never increases. When I use 'count(mynumber) + 1' the field returns 2 and also never updates. Finally, I used 'max(mynumber) +1' and it returns NaN. I have come to the conclusion that there is an array here, but don't know what I need to do, to fix this.
I have informed my manager of 'InfoPath 2010 Cookbook' so hopefully this will help, but I also took a gander as this following link, which was not easy to follow as I believe its for 2007 instead of 2010.
http://claytoncobb.wordpress.com/2009/06/15/auto-numbering-infopath-forms/
I am using SP 2010.
So, here is the simple approach to the simple request:
•Just like in any database, every item in every list and library in SharePoint has a unique ID. This ID is stored in the ID field, which is available for viewing in any list or library. Go to your list, modify the view, and check the box next to the ID field so you can see what I mean. This ID is 100% guaranteed to be unique and is never duplicated.
•Since you already have purchase order numbers, you can't use the IDs by themselves, however, you can use them to drive your auto-generated Service Order numbers
•The easy method for doing this is to utilize your SO field, which is now a Number field, and determine the differential between the next ID in the list and the next Service Order number that needs to be created.
•Then, create a simple workflow in SharePoint Designer 2010 that ONLY runs on the creation of a new item (only runs once per item/form), and set it to add the differential to the current item's ID (Something like Do Calculation: ID + 1200) . Next, use Set Field in Current Item to set your SO field to the variable created by the Do Calculation step
From then on, you will always have a GUARANTEED unique, auto-incremented SO # for each form, and you should make this field read-only inside the form so that users can only view it and not edit it.
--Clayton Cobb

Copy a value based on criteria Salesforce

On a Salesforce.com opportunity I have a number of custom fields that are potential options that the end client will eventually select.
Option 1 (Desc Field) Option 1 (Value)
Option 2 (Desc Field) Option 2 (Value)
Option 3 (Desc Field) Option 3 (Value)
At a future point the user will ultimately choose one of the options as the preferred option. What I want is then the value for the chosen option to be stored in another field without the user having to enter it again. A “nice to have” would also be that all 3 option descriptions, values and selected value are locked once this is done.
Any ideas?
Two things come to mind:
(1) The second field could be a formula field that derives it's answer based on the first field.
(2) A workflow rule using a field update to set the value of the second field, using a formula
(3) A trigger to do the same as #2.
As far as locking, one semi-popular method to lock a page layout is to essentially have two page layouts. The first layout has the fields normally, the second layout has the fields with "read-only". You then create a record type called "Read Only", for example. After the user has entered some specific information in a specific set of fields, a trigger could then check the record type from the normal default one, to the "Read Only" one.
To the user's point of view, the record will be the same, but now he sees it from a different page layout.

Filters in Lucene

Friends,
I am new to lucene full text search. i have developed page with full text seach. it works fine till. but now i want to add extra condition like where clause. how to do it.
The requirement given for me is, i have to list proposal which is created by logged in user. I have to add this condition in back end without user knowledge.
I heard about filter. Which filter is correct?how to apply that.Give me an sample. this evening i have demo. help me.
First, you need to ensure that the user id is being added to the document in the index in a field when you index, let's call it user_id.
In a pinch, you can add a field to the query string entered by the user behind the scenes before you send it to the query parser. So, take whatever query was entered and add " AND user_id:4" (where 4 is the value of the variable containing the current user id) onto the end of it.