Can a workflow populate values in a lookup field for all the items in the list?

I have a list called Contacts, with 4000+ entries. It currently has a dropdown choice column with four specified values for different offices (MAO, NHO, MEO and CTO). I want to convert this dropdown choice column to a lookup column that links to a newly created list with the four offices in it. The reason for this is because I want to use Mark Rackley’s cascade dropdowns to filter Contacts by office.

From what I understand you can’t directly convert a Choice field to a lookup field. So I thought I’d just create a new lookup field that links to the new list with the offices. The problem is there are already 4000+ items in this list that would need to have the applicable office chosen in this new lookup field.

Is there a way to create a workflow that will look at the value in the choice field and then select the matching value in the new lookup field for all the contacts? For example, it sees MAO in the choice field and then selects MAO under the new lookup field.

how to populate a list column with the Site Title

So I have a list in a site template that needs to contain certain information about the site automatically. I need a way to fill the Title column of the list with the Site Title and the Project Owner column with column with the content of the Owners permission group.

Is there a way to either auto populate these fields on site creation or perform this action with a workflow?

How does Sharepoint Online populate a page with dynamic information from a list?

Was trying to edit an existing home aspx page on Sharepoint online…

it contains an announcement section populated with the latest announcements. When i downloaded and edited the aspx page. I see the announcements div but I don’t see any content within it.

               <div id="divAnnouncements" style="">                     <h4>                         <strong>ANNOUNCEMENTS</strong>                     </h4>                     // content is supposed to be here but there's nothing                </div> 

My question is how does Sharepoint populate this div with content from the announcement list? Is it through a custom script that locate it based on div id? Or some script located in the master page? Or some directive?

Auto populate a lookup field with multiple entries after selecting multiple entries from a lookup

Please excuse me for the vaugness, required due to the type of work.

I have a list that indicates upcoming work on various items. When the work is finished on those items, drawings need updated. As it is, I have the items showing the date that the work is finished and a lookup that lists the various work numbers being performed on that item. The work being performed affects various drawings, so I have another lookup that looks up all the drawings. I want the first lookup for the work numbers to cascade to the drawings lookup, so that when I select the work numbers, only the drawings that are affected will auto populate. I do not have access to InfoPath or SPD (my company restricted that). So, all I can do is put script in a webpart. Any ideas?

I have found script that works when the first lookup is just one item, it will then show only the items that apply in the next lookup. I can’t seem to find anything that will let me select multiple items in the first lookup and display all applicable items in the second.

GSC Time to Populate?

Just a quick question – In Google Search Console / Webmastertools, how much time does it take for a new website’s data to start populating?… | Read the rest of http://www.webhostingtalk.com/showthread.php?t=1771396&goto=newpost

How to populate view models

So let’s say I have a view model, representing a student. The view model is corresponding to a student model, from which the data comes. What I am struggling with, is how to populate the fields in the view model. Do I simply forward reference the fields from the model (where possible) or do I have actual fields in the view model, which I then populate?

Example A – Forward referencing

public class StudentViewModel {     public StudentModel Student { get; set; }      public string FirstName      {         get { return Student.FirstName; }     }      public string LastName     {         get { return Student.LastName; }     }      // ...and so on } 

Example B – Using actual fields

public class StudentViewModel  {     public string FirstName { get; private set; }      public string LastName { get; private set; }      public void SetStudentProperties(StudentModel student)      {         FirstName = student.FirstName;         LastName = student.LastName;     } } 

So obviously both of these examples are overly simplified and I have left out stuff like INotifyPropertyChanged, but I think you get the point. Are any of my approaches viable, or have I completely misunderstood the intend of view models?

I also considered using the constructor for input, but this makes me struggle with the depency injection framework (I am using Caliburn.Micro).

Is it valid to let view models populate their own lists for dropdowns in mvc?

I’ve struggled to find any discussion on this.

If you have a simple MVC page for updating a User, and you put a dropdown list on it of Country, you need to populate the dropdown list in the viewmodel. Let’s call it List<Country> countries {get; set;}

If the page is posted, and there’s an error like they forgot to put a User Name in, we redirect them to the page again to try again, at which point we also have to remember to repopulate the model’s List<Country> before redirecting them back to the page.

Three ways to handle this that I know of:

  • In the controller, make a call to the database, e.g. viewModel.Countries = _dataAccess.GetCountries()
  • Store the list in the view bag and not in the model at all e.g. ViewBag.Countries = _dataAccess.GetCountries()
  • Put it into the view model itself, so that List<Country> {get { return _dataAccess.GetCountries(); and thus inject in a DataAccess object.

The third approach is what I am considering because then you don’t need to worry about populating/repopulating the fields in the controller. But I can’t find any evidence via searching that this is an acceptable method, so I fear there is a drawback I am not considering.

Infopath dropdown and populate a text with email and submit to that email

Morning,

PLEASE HELP – going mad. I been trying to work this problem out for days

I want to set up an info path form so that when I drop down the ACos Yr group (7-13) (from the sharepoint database) it will select the ACo Email address from the Sharepoint database and then when I select the submit button it will have the email pop up with the email address already populate, but for all my research and trying I cannot get the email box to populate. The drop down works fine. Any help much appreciated. Thank you for your help

Infopath form

Database

How populate notification in a TextView?

i’m working in a notification app (FCM) , and i would like to populate in a TextView the notifications i received in a new activity, when i clicked in the notification, the activity is showing , but without the notification message any help please this is my code

private void enviarNotificacion(RemoteMessage remoteMessage) { Map<String, String> data = remoteMessage.getData(); String title = data.get("title"); String body = data.get("body");  NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); String NOTIFICATION_CHANNEL_ID = "Acc";   Intent intent = new Intent(this, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.putExtra("title", title); intent.putExtra("body", body); PendingIntent pendingIntent = endingIntent.getActivity(this,0,intent,0); NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID); builder.setAutoCancel(true)         .setDefaults(Notification.DEFAULT_ALL)         .setWhen(System.currentTimeMillis())         .setSmallIcon(R.drawable.ic_notification)         .setTicker("Acc ")         .setContentTitle(title)         .setContentText(body)         .setVibrate(new long[]{0, 1000, 500, 1000})         .setContentIntent(pendingIntent)         .setContentInfo("info"); manager.notify(1, builder.build()); 

} and my main_where i want to populate the notification

txtTitulo=(TextView) findViewById(R.id.titulotxt); txtNotificacion=(TextView) findViewById(R.id.txtNotificacion);  Intent bundle= getIntent(); if (bundle != null) {     Titulo = bundle.getStringExtra("title");     MensajeNotificacion = bundle.getStringExtra("body");     txtTitulo.setText(Titulo);     txtNotificacion.setText(MensajeNotificacion);  } 

SharePoint 2013 External Content type. Populate secondary fields

I am trying to migrate data to a document library that contains a external content type using the SharePoint 2013 client object model. The external content type is pulling from a sql server 2012 table.

I can populate the external data column and the secondary fields using a brute force method shown below. However, I would like to trigger an event where sharepoint updates the field for me. Right now, I validate the values by querying the LOB system and then populating the fields that were provided to be visible.

I am having issues when I change or add a filter. Currently I am populating the Entity lookup from a FilterCollection object. How do I get an unbounded list of the LOB FieldValues?

I have read that Metavis! doesn’t provide this ability in their migration tool and that it might be a server side only available solution.

Please provide any help

The following is a snippet of what I have so far. BusinessDataField is an internal domain object.

 Microsoft.SharePoint.Client.Web web = clientContext.Web;   Microsoft.SharePoint.Client.List documentLibrary = clientContext.Web.Lists.GetByTitle(documentLibraryName);    ListItem item = documentLibrary.GetItemById(itemID);   string readListInstanceName ="Read List";   List<string> externalData = new List<string>();   foreach(BusinessDataField businessDataField in businessDataFields)   {      Microsoft.BusinessData.MetadataModel.Entity entity = clientContext.Web.GetEntity(businessDataField.EntityNamespace, businessDataField.EntityName);     Microsoft.BusinessData.MetadataModel.LobSystem lobSystem = entity.GetLobSystem();     Microsoft.BusinessData.MetadataModel.Collections.LobSystemInstanceCollection lobSystemInstanceCollection = lobSystem.GetLobSystemInstances();     clientContext.Load(lobSystemInstanceCollection);     clientContext.ExecuteQuery();     Microsoft.BusinessData.MetadataModel.LobSystemInstance lobSystemInstance = lobSystemInstanceCollection[0];      // get the filters for given name of method instance     Microsoft.BusinessData.MetadataModel.Collections.FilterCollection fCollection = entity.GetFilters(readListInstanceName);     // get the Line of Business data     clientContext.Load(fCollection);     clientContext.ExecuteQuery();     foreach ( var filter in fCollection)     {       int count = filter.ValueCount;     }     Microsoft.BusinessData.MetadataModel.Collections.EntityInstanceCollection result = entity.FindFiltered(fCollection, readListInstanceName, lobSystemInstance);     clientContext.Load(result);     clientContext.ExecuteQuery();     Dictionary<string,object> fields = null;     foreach (var r in result )     {       var found = r.FieldValues.ContainsKey(businessDataField.BdcFieldName) && r.FieldValues.ContainsValue(businessDataField.FieldValue);       if(found)       {         fields = r.FieldValues;         foreach(var secondaryField in businessDataField.SecondaryFields)         {           string [] value = secondaryField.Value.Split(new char[]{'_'});           string column = value.Last();           foreach( var update in fields)           {             if(update.Key.ToUpper().Equals(column.ToUpper()))             {               item[secondaryField.Value] = update.Value;               break;             }                           }                      }         break;       }             }     string encodedValue = EntityInstanceIdEncoder.EncodeEntityInstanceId(new object[] { businessDataField.FieldValue });     item[businessDataField.RelatedFieldName] = encodedValue;     item[businessDataField.FieldName] = businessDataField.FieldValue;   }    item.Update();   clientContext.ExecuteQuery();