disable a control on Nintex forms based on rule for specific user ? - nintex-workflow

i want to disable a control on Nintex form for user in my active directory
for example the name of user is a.sedighi and the name of domain is elevator110 how can i do it? what kind of rule can i use to solve this problem?

The rule to disable a control based on current user is
currentuser == "domainname\username"
Or create a group based to whom the control should be disabled.sect the control right click and under setting click on apperance tab and under disable select expression and add the below expression
Not(fn-IsMemberOfGroup(group name)

Related

Multi Select using angular schema forms

I am currently using multiselect checkbox in a dropdown using angular schema forms and my requirment say to disable some other control based on a value selected But I am unable to bind any events to checking of a check box in multi select.
Can anyone Help me on this?
If I understand well you want to remove controls base on some condition of other controls. I made it by adding a condition on the form definition like:
"condition" : "model.nameOfField == 'valueOfField'"

Sitecore MVC Checkbox

In Sitecore MVC, FieldRenderer.Render(Item, "Field Name") automatically checks its field type. In another word, all XSLT extensions (sc:text, sc:image, sc:date, …) is affected by the RenderField pipeline.
But, I couldn't find sc:checkbox information and it doesn't show "CheckBox" in page edit mode. It just shows the value of the check box.
How can I make it show as like input type=checkbox in page editor?
Sorry for the link only answer but the general approach here is to use a Field Editor Button.
This will open a pop up window with the content editor style control for the field.
If using a custom experience button is not an option for you, you can output different markup (i.e. your input button) to the client when the page mode is in 'Edit' mode.
This will allow you to present the author with the controls you wish to display, but still output the normal output values for end users.
If you are able to use controller renderings, you can use the controller to load a different view to make this easier, but otherwise you can use if statements within your View to output different markup.

DevExpress DateEdit Force user to use menu popup

I have a WinForms app that uses this control and I would like to prevent the user from typing in a date. We want to make them have to use the popup calendar to make the date selection.
I tried setting ReadOnly of course but that puts the whole control into the read only state.
Our version of DevExpress is: 9.1.9.0
You can accomplish this task using the RepositoryItemButtonEdit.TextEditStyle property.
Assign the DisableTextEditorvalue with this property. In this mode a button editor is displayed in its normal way. However, editing and selecting text is not allowed.
Code snippet:
dateEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;

Panel Pane visibility rule based on users in entity reference field

I have a content type called 'company' with an entity reference field called 'company_managers' referencing users who will be allowed to add and edit other content types relating to this company.
The company node is displayed using panels. What I am struggling with is to create a visibility rule which will only show a panel-pane if the logged in user is referenced in the entity field 'company_managers' this will allow me to show panel panes specific to users in the 'company_managers' field.
So the psudo logic for the visibility rule would be:
Check if logged in user is contained in 'company_managers'
If yes show panel-pane
if no
dont show pane.
This seems such a simple use case that i dont want to create custom code it must be achievable 'out the box' I just cant seem to get to the answer. So after two days of researching am asking for help.
NOTE: have spoofed this behavior using the visibility rule content manager and manually selecting a user on this site. All I would need is to put in the logged in user but I dont think you can put in dynamic variables or tokens.
Help much appreciated.

How to interact with other application forms

I am looking for a way to once I see a form by Name add a button to that form and when the user clicks the added button, pull information from the form. For example, if I see the for title - "Stack Overflow - Wnidows Internet Explorer" I would add a button "MyButton" on the form, and when that button is clicked, I would "pull" the information from the "search" box. It should work on Web or Win forms.
Any help would be greatly appreicated.
I found my answer
You need to get the window handle to the form in question.
To put the button on another form you need to create the button and set its owner to the other window and set the buttons window position.
You can use the same window handle to enumerate the child windows to get the text if its an edit control.

Resources