There is this SharePoint list that got his "Title" field set to raw Text, with default value "Order n°". Once a new entry is created, a unique number is concatenated to the text but it's not working properly so I have to fix it.
However, I have no idea where the unique number comes from. There is no clues on the list parameters, I checked the company Power Automate flows, they got nothing.
Do you have an idea where this could come from ?
Related
I am working on a small COVID screening app. I have 2 lists in a single Sharepoint site:
BasicInfo:
ID (autogenerated by Sharepoint)
Name
Company
PersonalInfo:
BasicInfoID (a Lookup field to BasicInfo.ID)
Personal Phone
Personal Address
Company Phone
Company Address
All fields in both lists are required.
Creating the Powerapp, the BasicInfo form works as expected - records are populated in the Sharepoint list, and I can access the ID generated with BasicInfo.LastSubmit.ID after submission.
On the second screen of the app, I am having a hard time getting the "BasicInfoID" field populated. I am expecting to be able to set the value of BasicInfoID on the 2nd screen, then hide it, so the end user doesn't need to see (or populate) the value.
I have tried:
Setting the default value to BasicInfo.LastSubmit.ID, but I get an error of "Expected Record Value. The property on this control expects Record values. The rule produces Number values which are incompatible."
If I set the default value to BasicInfo.LastSubmit (no .ID), the form oddly submit - but the resulting data in the Sharepoint list doesn't show any value in the "BasicInfoID" field - it lists it as Required Info.
If I remove the automatically generated BasicInfoID field, I obviously get an error of "BasicInfoID: Field "BasicInfoID" is required."
I have added a Text field, assigned the DataField value to "BasicInfoID", set the default value to BasicInfo.LastSubmit.ID, but the form fails with the same error (BasicInfoID: Field "BasicInfoID" is required).
Thanks in advance!
When you do a LookUp from one SPO list (1) to another (2), the schema of the field in the list 1 is the same as the one returned by the Choices function. So in your scenario you can use this expression:
BasicInfoID: LookUp(Choices(BasicInfo, Id = BasicInfo.LastSubmit.ID))
The post at https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/ has some more detailed information about using complex columns in SharePoint (such as LookUp ones).
Hope this helps.
I've been looking everywhere... for days. (I'm stubborn so I don't like asking questions before trying.) So here is the hardest question ever:
I have a SharePoint Online (2013) Custom List on which I'm running a Workflow. The association shows so the Workflow actually runs, and I receive email from it to one of the hard-wired emails.
The problem is getting an email dynamically, from a Person/Group field in the list. I have a field named ResponsiblePerson. When I try to get the value of that field (all I care about this "Person/Group" is the email), it seems to come as a null or empty string value.
I've tried many different variations to the following:
First I get the item.
Then I get values from the item. I just get ResponsiblePerson and put it in a variable called rp1. I tried to make this variable of type dynamic and string. Both didn't work, as I get an empty value in the email (see next step).
Finally, I send an email.
This email is addresses to a static email for testing. I get an empty rp1 otherwise I would have specified it in the To of the email activity (within a collection) and we would be done.
Use the field name + "Id".
Here is where I blog about this: http://mazdev.blogspot.ae/2014/05/get-value-of-persongroup-list-item.html
For our Employee records within NetSuite, we have a custom field called "Employee Number" with an ID of custentity1. I've created a workflow that will automatically create a new employee record and populate various fields but the one I'm having difficulty with is the Employee Number field. All I want to do is to grab the largest employee number there is out of all of the Employee records and add one to it for the new employee record.
The Employee Number field is a free-form text field so I know I'll have to use TO_NUMBER, but anytime I try and reference {custentity1} I keep getting an error saying that field is not found.
UPDATE: I've created a new custom field for our employee records called "Employee No." with an ID of custentity_employeenumber. I've also created a javascript file with the following:
function getMaxEmployeeNumber(){
var empNumber = nlobjSearchColumn('custentity_employeenumber', null, 'max');
return empNumber;
}
But how to do I get this to work with my records?
NetSuite does have an auto-numbering mechanism built in to its native functionality that most of our customers use for this exact purpose. Is there a special reason this functionality is not being leveraged? This functionality is accessible at Setup > Company > Auto-generated Numbers.
I do not work much with workflows, so I do not know if this same functionality is possible there, but here is how I would solve this in SuiteScript:
Create User Event script that is executed on Before Submit Create event for Customer records
Create a Customer search that has a Search Column for custentity1 with a summary type of max
new nlobjSearchColumn('custentity1', null, 'max');
Running this search should give you 1 result, which is the maximum customer number. You can then just add 1 to it.
You could create a similar Saved Search in the UI to see what the result set looks like.
This will only really work if the field is a Number, not Text. I would suggest changing the field to an Integer field if you know that it will always be a number. This may clear out existing data, so first you could export all customers and their number to Excel and then do a CSV import after changing the field.
How are you looking for the last employee in a workflow?
I know this can be done in js:
Search employees - returns max 1000
For number of employees give me the custentity1 of the last one - nlapiLookupfield('employee',employees[employees.length],'custentity1')
Add +1 and save on new record
If you use this search column
nlobjSearchColumn('custentity1', null, 'max');
You can also sort it in decreasing value so that the first result is always the max. Something like
nlobjSearchColumn('custentity1', null, 'max').setSort(true);
I have a form. When I open the form the two fields called office and group should be picked up from another database named something like staff.nsf. The data is picked up based on the applicant name as key. I have included my name in staff database. But the form is not picking up the two fields from the staff database.
The field formula goes like this,
server := #Name([CN]; #Subset(#DbName; 1));
temp:= #If(Applicant != ""; #DbLookup( "" : "NoCache"; server:"Mast\\Staff.nsf";
"ByApplicant";Applicant; 2); "");
#If(#IsError(temp);"";temp)
Is it a system bug? Can anybody help please.
Regards,
Priya
Lotus Notes is more than 20 years old, and extremely well-tested. It is very unlikely that you have found a "system bug". There are any number of possible problems here, and you need to carefully rule them out until you find the actual problem.
The first thing you should do is take the #IsError out of the formula (temporarily). By having it there, you are suppressing a potentially useful error message. Ok... admittedly the error messages are usually not that helpful, but sometimes they are. If you don't want to take it out of your formula, just add another computed-for-display field with just the #DbLoookup -- and follow Ken's advice about hard-coding everything.
Then review all of the following:
Is "mast\staff.nsf" the correct path for the database?
Do you have access to the database?
Is "ByApplicant" the correct name for the view? (Spelling errors happen!)
Do you have access to the view?
Do you have access to the documents in the view?
As Ken mentioned, is the first column in the ByApplicant view sorted?
Is the name value you are passing for Applicant in the exact same format that appears in the view column? (I.e, if it appears in abbreviated form in the view column, make sure that you are passing it to #DbLookup in abbreviated format.)
Does the second column of the view contain the value that you are trying to read? (Check out the rules for counting columns in the documentation for #DbLookup.)
A few thoughts:
The ByApplicant view needs to have its first column sorted alphabetically and that column should be the list of applicant names you are matching on
Try hard coding the value for applicant in the #DBLookup to see if it works, and to rule it out as the problem.
This does not work on the web, only on the client (I believe)
I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.