Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.
Users reporting for no reason may be locked out.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Results;
namespace Scripts
{
public class test : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
IEntitySessionResult result = (IEntitySessionResult) value;
Spreadsheet sheet = item.Theme.Spreadsheets.Find("TESTING CSV.csv");
var check = sheet.FindRow(result.Entity.CurrentDriver.Id.ToString());
var row = sheet.FindRow(result.Entity.CurrentDriver.Id.ToString());
if (check != null)
{
var name = row[1];
return name;
}
return result.Entity.CurrentDriver.Name.Split(' ').FirstOrDefault();
}
}
}