Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing M-Files External Object Type Data Source (beta) Sample #4

Open
Koushiq opened this issue Feb 20, 2023 · 3 comments
Open

Missing M-Files External Object Type Data Source (beta) Sample #4

Koushiq opened this issue Feb 20, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Koushiq
Copy link

Koushiq commented Feb 20, 2023

The csproj provided in this repository does not matches the newer (M-Files External Object Type Data Source (beta) )
could you provide one sample which includes column mapping

@Koushiq Koushiq changed the title Can you provide a sample for the latest M-Files External Object Type Data Source (beta) that includes column mapping! Missing M-Files External Object Type Data Source (beta) Sample Feb 20, 2023
@CraigHawker CraigHawker added the documentation Improvements or additions to documentation label Feb 20, 2023
@CraigHawker
Copy link
Collaborator

CraigHawker commented Feb 20, 2023

I agree that having a branch showing this would be good (the older version could be kept as a separate branch). For now: you can find an example in the "Twelve Days of Code" solution (the "import gists" project): https://github.com/M-Files/TwelveDaysOfCode

I lied. This approach uses another approach. This sample is currently missing. I can add it to our backlog.

@Koushiq
Copy link
Author

Koushiq commented Feb 21, 2023

please provide example with column mapping

@CraigHawker
Copy link
Collaborator

I'm not sure exactly what you're after, @Koushiq. You don't provide a column mapping in an external object type data source. Instead you expose the columns that the data source has, and the user then creates the column mapping when configuring the connection in their vault. This is because the configuration of each vault can differ drastically, so there's no way for your connector to know beforehand how it should be mapped.

To declare the available columns you should return them from DataSourceConnection.GetAvailableColumns, something like this:

	public partial class DataSourceConnection
	{
		public override List<ColumnDefinition> GetAvailableColumns()
		{
			var columns = new List<ColumnDefinition>();
			// TODO: add columns
			return columns;
		}
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants