Implement the string function in InfoPath 2010 - infopath2010

I have designed an InfoPath 2010 form with two views and published in SharePoint 2010 form
library thru central admin.
The two views are:
Data Entry View
Read Only View
Condition is: After submitting the Data Entry view if the same user try to open the form it
will redirect to Read Only View. In my data entry view i have user full name field, so
i am not dealing with username() only, i am dealing with user full name. For example when the form is opening full name is displaying on the form: like Sumit Kumar, For this empname Windows logon name is: sumit_k
Now how can i set the rules in infopath, so that more than one time user can not submit the form. There are so many condition in rules: like contains, begins with, matches pattern, is present etc.
How can I implement the above logic based on rules?

You just have to use a "Form Load" rule.
If i understand correct the user full name field will not be empty after you've submitted the form.
If this is so you can check if this field is empty or not when the form loads.
So make the rule like this
New Rule - Action Rule
Condition - "name of you username field" is not blank
Run these actions - switch views (pick your read only view)
Now everytime your form will be opened this rule will be triggered and if the username field is empty you'll get your default Data entry view. When it's filled in you will get the read only view.

Related

Powerapps how to choose fields that are submitted to SharePoint list

I have taken over a project from someone who has left the business.
It is a Microsoft PowerApp which provides users with a form interface to upload items into a SharePoint list.
The submit button in the app works and the function is "SubmitForm(formName)"
My question is how does it know which fields to submit into which column in SharePoint?
for instance if I wanted to create a textbox in the form for "First Name" how would I make the powerapp submit the contents of that textbox into firstname field?
--edit removed screenshot--
I think you lack knowledge of powerapps w.r.t sharepoint.
Go through one of the example mentioned in docs of micro soft and you will get idea of how mapping of fields are done.
Your main concern is mapping fields.
https://learn.microsoft.com/en-us/powerapps/maker/canvas-apps/app-from-sharepoint
If you check your edit form, and click on any of your field/data card you will find settings as below. Here I have created custom column as "NumberColumn" and you can find Data properties same for your field as well.

Netsuite Inventory Item Custom Forms keep changing

We have created a custom form for certain inventory items in Netsuite. When we want to go back and edit that inventory item, it automatically goes back to our default custom form. We manually have to change the form back to what we want to use each time we edit these types of items.
Is there a way to have it so when these specific items are opened to edit that it will always go to the custom form that we originally created it on?
No need to create a workflow/script. You just need to set the custom form to "Store Form with Record".
Customize the form and checked the option that says "Store Form with Record".
Every time you create an Item Record select the form and fill in the necessary information and save it. After saving it the form will be automatically saved with the record and it will be used every time you edit and view the record.
Definition of "Store Form with Record"
Check this box to store this custom form with each record entered with this form.
This ensures that your records are viewed and edited with this form regardless of who is viewing or editing the record.
Options:
1. Add the custom form to the menu and choose that menu item when editing those types of inventory items.
Write a workflow (SuiteFlow) that opens the correct form based on the inventory item type.
Write SuiteScript that will open the correct form based on the inventory item type.

checking if current user is author of the document

I have a formA where I have a field '_author' which is of type Authors/Computed for display with value (#Subset($Updatedby;1)). I display information from formA on viewA. What I want to achieve is that documents that are created by you are only visible to yourself on viewA. I tried the following formula in viewA 'View Selection':
SELECT (form = "formA" & #UserName =_author). Even though I know that these two variables have the same values when I read it from the document's properties, the condition is not satisfied and I do not see a single document. If I delete everything after "&", the view shows all documents.
All is hosted on a server which handles users.
A handy workaround is to create a Page with an embedded view. This view is exactly like your view but has an additional first categorized (!) column with your field _author.
Put into embedded view's property "Show single category" the formula #UserName or #Name([CN]; #UserName) depending on how your categorized column _author is formatted. Show then always the Page instead of the view.
This way you avoid trouble with "Shared, private on first use" views and users see exactly their own documents only.
#UserName works in a special manner in selection formulas in views. In your case the view should be Private on First Use. Read further here: http://www-01.ibm.com/support/docview.wss?uid=swg21089773 .
Be aware that this lead to all sort of issues, e.g. when you update the design of the view users must remove the view manually to get the changes deployed.

Make few fields of SharePoint list infopath form read only

My requirement is New form should have all fields editable and Edit form should have few fields read-only (Like ID entered by user in New form for the item).
How is it possible through form customization done using Infopath.
You could have a checkbox or any bool control that gets checked when a form is initially filled out and submitted to a SharePoint list, have it change value "on-submit". When the form loads just add a rule that if 'existingForm' (or whatever you name the control) is checked and if it is then disable/or hide the control.
You could disable the controls, or you could hide them completely and display their values through a calculated field/value which is normally hidden.

Customize Survey fields in Sharepoint 2007

I have a Survey list which has several questions, one of those is people picker field and the another one is single line of text field.
I need to hide a perticular question ( field ) based on login user. Requirement is as below
When the user logs in as admin
a. Display ‘people picker’ and should not allow user to pick his name from people picker.
b. Hide Single line of Text field.
When the user logs in as ‘Non-Admin’
a. Display ‘Single line of Text' field and default it to have the logged in user name (without domain name).
b. Hide ‘People picker’ control.
I am thinking that we can do it by placing javascript in content editor webpart and add it in newform.apx of survey list. Can anybody give me the proper approach to get it done?
Thanks in advance
You might like to try creating a custom field control, a differnet one for each field.
Javascript is fast and involves minimal deployment, but is fiddly and can be turned off.

Resources