Import Format script required to work in multiple areas
I am currently building an import Format and the use of scripts to import datapump on several of the fields to implement the specific logic based on present values. For example:Function TBNetwork (strField, strRecord)
If left (strField, 1) = "N" Then
TBNetwork = strField
On the other
TBNetwork = 'network n/a '.
End If
End Function
However, I need to also assess the values in other areas also, but two default entries of the function are strField and strRecord.
How can I achieve this? Can I declare new variables and define as well?
StrCustomer = varValues (23)
Or am I looking for to implement another type of script? Any suggestions would be greatly appreciated!
strRecord represents the line of all the data from your source file that is currently being processed. You can analyze this to get the values of your data use/evaluate line in your script. There is a script Accelerator DW. Utilities.fParseString that will make the analysis of the channel for you. As you probably know strField returns only the field of the data file that you specified in your format of import for the associated dimension.
Tags: Business Intelligence
Similar Questions
-
Import Format script to update multiple fields
Following my previous post yesterday (Import Format script required for work in several areas , now I need my script import to Update several fields (two) at the same time, based on criteria across multiple fields. ) So far, I can use DW. Utilities.fParseString to assess values across several fields, but now I need to update not only the field in question, but also an additional field at the same time. For example:
Function TBService (strField, strRecord)
"How to upgrade a second field at the same time?
Dim strField2 As String
If left (strField, 1) = "S" Then
If DW. Utilities.fParseString (strRecord, 3, 8, ',') = 'B1110"Then
strField2 = "N101.
On the other
strField2 = 'network n/a '.
End If
TBService = strField
On the other
TBService = "Service s/o".
End If
End Function
Is it still possible? Should I look for to create an event script that would work subsequent to importation? Or is it possible here in the import script?The second field you are trying to manipulate should have its own import script.
-
Power cli script does not work for multiple VM
Hello
Please find the script to get the cpu usage and the memory of the virtual machine.
Attached script works fine for single virtual machine. We get the output so that a virtual machine, there are still several vm in the source file. Output file is also attached.
I don't know there are more elegant ways to do this, but it should work for you.
$metrics = "cpu.usage.average", "mem.usage.average".
$start = (get-Date). AddDays(-1)
$vmList = get-Content - Path C:\_temp\VMs.txt
$MyCol = @)
$Results = @)
foreach ($vm to $vmList)
{
Get-Stat - $vm - Stat $metrics entity - start $start |
Group-object - property entity.
ForEach-Object-Process {}
$MyCol = "| Select-Object - property VM, Date, CPU, memory
$MyCol.VM = $_. Group [0]. @entity.name
$MyCol.Date = $_. Group [0]. Timestamp.Date
$MyCol.CPU = $_. Group |
Where-Object - FilterScript {}
$_. MetricId - eq $metrics [0]
} |
Measure-object-medium - value of the property.
Select-Object - ExpandProperty average
$MyCol.Memory = $_. Group |
Where-Object - FilterScript {}
$_. MetricId - eq $metrics [1]
} |
Measure-object-medium - value of the property.
Select-Object - ExpandProperty average
}
$Results += $MyCol
}
$Results | Export-Csv-path C:\_temp\vm-resource-report.csv - NoTypeInformation - UseCulture
-
Hello world
We have our source CSV (Delimter file) file requirement we have subfolders
Account currency amount Costcenter
C001 1001 USD 1000
1002 C002 2000 INR
1003 C003 3000 EUR
According the data above, we want to only data records USD will be imported in FDM .like it
1001 1000 C001
In import format jump, I used and I wrote the script to import to Skip like this
Dim strAccount
"Store the first value of the account
strAccount = strField
' Check if the value is empty
If strAccount = "RIN", "EUR" then
"Line break
Res .PblnSkip = True
On the other
AccountEmptySkip = strAccount
End if
End Function
When I import the import all records. his recordings not INR jumps and EUR
Can someone help me solve this
The problem here is that you mix the jump feature implementations. You can specify Skip in the name of the Format field import from files of fixed length, where it will then evaluate the expression to see if it matches all characters in the specified file. For delimited files, you will need to use a script to import, to evaluate and to apply the criteria of Skip here.
What you need to do is the following:
(1) change your import format to below
Field name field number expression several fields
Account 4 1 Script = Skip.uss
CostCenter 3 4
Amount 4 4
(2) modify the Skip.uss script as follows:
Dim strSkip
strSkip = DW. Utilities.fParseString (strRecord, 4, 2,",")
If strSkip = "INR" GOLD strAccount = "" EUR Then
SelectCADLines = strField
On the other
Res .PblnSkip = True
End if
This assumes that your file is delimited by commas, if not change the delimiter (in bold) on the 2nd line of the script above to what you use as the delimiter in your source file.
-
FDMEE import Jython Script - field Split function
Hi people,
I have to admit, this Jython gives me a heavy headache!
In fact, it's a simple mistake, but I'm fighting around with it for hours now. Maybe one of you guys can help.
I want to create a Script of Import in FDMEE 11.1.2.3.500.17. The source file (separator: tab) contains a column with the following entries:
What I want to achieve at first is to import the figure after the first point. For example, hours - 00275. 3. 4.1 I want to import 3.
I wrote a script to import, based on an example of written script in FDMEE admin guide (page 273):
I assigned this script to the respective column in the Import Format:
Seems easy. But for some reason, it does not. The problem is: even the log file is not help, because it seems to be growing constantly when I want to open it (after becoming 30 MB I cancelled). By the way: without this script works import.
Any ideas? Help is very appreciated!
See you soon
Carmonte
I wasn't talking about the script file extension, as you say is irrelevant, your file name of the script was eGRCcISPA (without the extension) and your function called eGRCsISPA (in the body of the script). They were different and should be the same. They are the same today? Also when you say that this does not work, what do you mean?
(1) import runs successfully, but represented for that field values are not what you expect the rest of the script is running?
(2) the mistakes of import process when using that import format?
-
I can't import my script (film) into Adobe Story. The error message says: I am unable to connect to the Adobe servers. Is this a problem with the Adobe?
Yes and no it seems that if the file is a .doc or .pdf, that it does not load properly. But if I bring him in a Final Draft format, it works perfectly.
Adam
Sent from my iPhone
-
Fixed-width import format FDM &; periods/accounts question
Hi experts FDM.
I have a problem I wanted to tender out to you on about the fixed-width import formats and how to meet my current scenario for export to Hyperion Planning.
I work with a flat file (.txt), I need to import the FDM with the current format;A B C D E F G ... Z Year Channel Product MTD-account-Jan 1 MTD-account-Jan 2 Jan-VOE-account1 Jan-VOE-Account2 .... Dec-CDA-Account2 2013 Channel_1 Product_1 1000 2000 1000 2000 10000 These are all fixed in width for the field lengths must be defined in the import format. The obligation for the loading of the system is only a speciifc value account 1 and account 2 months a year.
If my choice month is 2013 Jan, I need only the columns F and G to be charged. These are the issues I've identified;
- A fixed-width import format can accommodate for the loading of multiple accounts in the same file? Or I would need a format to import separated by account?
- A fixed-width import format can accommodate for variable current months loading? Or do I 12 import formats/sites per month?
Your help is very appreciated!
Thank you very much
AaronSend me an email
Thank you
-
Book level - import formats and master pages
Hi all
I am very new to writing scripts for framemaker (and a perfect beginning to script) and I find a little difficult to find information in an environment that I do not know in. Maybe you can help me.
What I would do:
I would like to be able to change master pages, page layouts, paragraph formats and character formats in the first document of a book and then run the script, which will be
- import pages masters and the first document formats into other documents (just like if go you via file > import > Format),.
- the book was updated.
In the folder in the installation folder example scripts, I found an example script which runs through all the documents in a book:
Book = app. ActiveBook;
comp = book. FirstComponentInBook;
while(COMP. ObjectValid())
{
Open (comp. name);
nextComp is comp. NextBookComponentInDFSOrder;
prevComp is comp. PrevBookComponentInDFSOrder;
compType is comp. BookComponentFileType;
Log ("BookComponent.log", "CompName"- + comp. name);
Log ("BookComponent.log", "comp" file Type - + compType);
Log ("BookComponent.log", "Component Type (FDLR, Grp, line)-" + comp.ComponentType);
Log ("BookComponent.log" + "PreviousCompName" prevComp.Name-);
Log ("BookComponent.log" + "nextCompName" nextComp.Name-);
Log ("BookComponent.log", "-");
component Process here.
model = nextComp;
}
open function (filename)
{
openProp = GetOpenDefaultParams()
i = GetPropIndex (openProp, constant. FS_FileIsOldVersion)
.propVal.ival = constant .FV_DoOK openProp [i]
i = GetPropIndex (openProp, constant. FS_FontNotFoundInCatalog)
.propVal.ival = constant .FV_DoOK openProp [i]
i = GetPropIndex (openProp, constant. FS_FontNotFoundInDoc)
.propVal.ival = constant .FV_DoOK openProp [i]
i = GetPropIndex (openProp, constant. FS_FileIsInUse)
.propVal.ival = constant .FV_DoCancel openProp [i]
i = GetPropIndex (openProp, constant. FS_AlertUserAboutFailure)
.propVal.ival = constant .FV_DoCancel openProp [i]
retParm = new PropVals()
docOpen = Open (filename, openProp, retParm);
Return docOpen;
}
function Log (logFile, textLine)
{
file = new File ("C:\\ESLog\\"+logFile);
leader. Open ("a +", "TEXT","?");
leader. Write (TextLine + "\r");
leader. Close();
}
Makes me started a little. I saw the line here //process component / /, and I am a little familiar with programming and scripting. I sort of see how it works in principle. But then I'm at a loss.
I know there is a lot of documentation on scripting FrameMaker (I have the script guide). But I can't find the corresponding information without spending hours of learning.
Could someone help me?
Huge gratitude in advance!
Matthias
Hi Matthias,
While Jang was cooking a script, I have too, so here's my version... that the duel begins!
An essential point about your original message... that the example script is almost here, everything you need to add was:
-A line to remember the first document in the book. You will see that in the script of Jang where he defines 'sourceDoc' and my script where I define "firstDoc.
-A call to SimpleImportFormats() on each document to import this first document formats. You will see that in both scripts.
In addition, the example script included a lot of logging that was not really relevant to the task you want to complete, so I simplified the logging to be easier to apply. You don't want logging at all... in which case you might lose the Log() lines. It was just something useful sample showed how to do.
Jang script includes a function to search for a document currently open before you attempt to open it from the file system. I think it is good practice and something I would work myself in a script like this.
My script includes checking for a file of open book, in which case the book window is currently active. You can or don't want that. I put that much because it's often a pain to have to remember that the book window must be active.
In any case, with this, enjoy!
Russ
var doc, firstDoc = null;
var counter = 0;
This set to a text file on your computer
where you want to record to write.
The folder must exist but the file
will be automatically created.
var logFile = "C:\\temp\\delete\\import_formats.log";
Book = app. ActiveBook;
if(!book.) ObjectValid())
{
If no book window is currently active,
Find an open book, and then invites
If we really want to use this one.
Book = app. FirstOpenBook;
If (book. ObjectValid())
{
If the user does not wish to use the first open book,
reset the variable of the book to the invalid object for that
future treatment was not held.
If (! confirm ("no book is currently active." +))
'You want to treat' + book. Name + "?"))
Book = app. ActiveBook;
}
}
Log (log file, "");
Log(logFile, "---------------------------------------------");
Date = new Date();
Log (log file, date.getMonth () + "/" +)
date.getDate () + ' / ' +.
date.getFullYear () + ' - ' +.
date.getHours () + ': ' +.
date.getMinutes () + ': ' +.
date.getSeconds ());
Log (log file, "script to start importing format...");
do the treatment. If there is no valid book to this
point, there will never be a model valid and so this will
all be ignored.
comp = book. FirstComponentInBook;
while(COMP. ObjectValid())
{
Download the document associated with the component, opening
It is so necessary. If we are the first, store the object
because it's the one where we import the
formats
doc = open (comp. name);
if(FirstDoc == null) firstDoc = doc;
check the type of component. No need to bother with folders and groups.
compType is comp. BookComponentFileType;
If (compType! = Constants.FV_BK_FOLDER & compType! = Constants.FV_BK_GROUP)
{
component Process here.
Journal (logFile, "import to:" + comp. name);
The first document import formats
doc. SimpleImportFormats (firstDoc,
Constants.FF_UFF_PAGE | Constants.FF_UFF_PGF | Constants.FF_UFF_FONT);
counter ++;
}
iterate to the next component, when it exists.
model is comp. NextBookComponentInDFSOrder;
}
Log (log file, "Total files:"+ counter ");
Log(logFile, "---------------------------------------------");
open function (filename)
{
openProp = GetOpenDefaultParams();
i = GetPropIndex (openProp, constant. FS_FileIsOldVersion);
.propVal.ival = constant .FV_DoOK openProp [i];
i = GetPropIndex (openProp, constant. FS_FontNotFoundInCatalog);
.propVal.ival = constant .FV_DoOK openProp [i];
i = GetPropIndex (openProp, constant. FS_FontNotFoundInDoc);
.propVal.ival = constant .FV_DoOK openProp [i];
i = GetPropIndex (openProp, constant. FS_FileIsInUse);
.propVal.ival = constant .FV_DoCancel openProp [i];
i = GetPropIndex (openProp, constant. FS_AlertUserAboutFailure);
.propVal.ival = constant .FV_DoCancel openProp [i];
retParm = new PropVals();
docOpen = Open (filename, openProp, retParm);
Return docOpen;
}
function Log (logFile, textLine)
{
file = new File (log file);
leader. Open ("a +", "TEXT","?");
leader. Write (TextLine + "\r");
leader. Close();
}
-
Java script not working not not in 1 pdf, but the same script does NOT work in other
Dear Experts,
I have a problem with java script.
I created 2 PDF files with the same name under the names of form and shape.
I wrote a javascript script and the script seems to work in a (Demand2.pdf) and DOES not work in others (exemple.pdf).
The link for Demand2.pdf is
https://Acrobat.com/#d=XIydWx1RIU4oNdTySHtHfgand the link for exemple.pdf is
https://Acrobat.com/#d=sKPRs2dtDY57RSvMVtnh3wCan you please guide me on this.
Thank you very much
BookFans
Hello
The second file (exemple.pdf) is saved as Static. The script changes the visual appearance of the form (show and hide objects). This requires the file to save dynamic PDF format. This option is available for registration - as the dialog under the file name.
Good luck
Niall
-
Script no longer works when I remove beep
I am trying to create a script that will get the number of words in a Pages document, and then save in a Numbers spreadsheet. I am a novice coder and until about 6 hours ago, I got this script, I had never even heard of Applescript. But with trial and error, I came up with this script to display the number of words in my document:
say application 'Finder '.
activate
Set myFile to alias "user: boldfish98:Desktop:Aviator alias.
myFile Open
beep
say application 'Pages '.
tell front document
say text body
the value myCount to count words
end say
end say
close front document
end say
end say
myCount
(I posted only myCount to make sure it works, ultimately, it will not display). This script was working fine so I started on the part that would put the number of words in the worksheet. I have made good progress on this front, I noticed a really annoying problem with the above code. When I was working on this part I put a bunch of beeps at different points that I would like to know when the code stopped working. I deleted most of them, once I knew that the code worked and I was ready to move on to the next part. But when I tried to delete one of the beeps (the only one left in the code that I put in this post), the script no longer works. I get this error in script, emphasizing "word count":
Pages has been an error: failed to get document 1. Invalid index.
It did not make sense to me so I checked over and over again to make sure that I had not deleted anything else, but it was just the beep. When I put the beep back in at exactly the same place the script developed, when I pulled it again I got the error. Even with my extremely limited experience I am sure that something is wrong and my coding script should not to beep to run. I looked through the internet to see if anyone else has had this problem and found nothing, so I started to browse all the posts here the applescript, and I saw someone ask if error a poster that's happened on the compiling or running. I know type of compilation of what means but I do not know how it is applied to the script editor. I guess this is what happens when I press on save and the light purple text gets formatted with 'say' in "BOLD", "application" in Blue italic and so on. I don't get the error, then, it happens when I run. Sometimes when I run the script with the beep I always get the message, so I think that there could be something wrong with the way I count the words (if you know it please report it), happened only 5% of the time that I run with beep. And it happens 100% of the time when beeping is not there.
Here are the things I've tried (none of them worked):
-copy and paste the code without the beep in a new document from the script editor
-Retype the code without the beep in a new document from the script editor (I got the same error but when I added in the beep it worked)
-restart script editor and pages
-restarting my laptop
-Commenting on the beep
-replacement of tone with screen of dialogue ("Hello world!") the dialog box display worked, but after I clicked OK in the dialog box the script stopped running, and I got the same error
-remove the beep and but leaving empty line
-remove the beep and the empty line
-change slightly the other parts of the code as a substitute "document before closing" by "quit".
a lot of these I didn't work, I was just desperate. I also didn't expect the success of my script a beep. I feel like script editor knows I'm brand new to this and so he's trying to trick me. Any help would be greatly appreciated. And if you know other ways I could improve this code, I'm all ears. Thank you!
Also I just got this new laptop as a week ago, so I don't think that this problem is related to my software is obsolete.
When I tried cela it is line 3 that caused the problem; It should read
value alias myFile "alias Users:boldfish98:Desktop:Aviator.pages".
As you, it did not work even with the beep; with this change, he worked with and without the beep. Other than that, "beep" takes back you to the inventor, but I don't see why that should be a problem.
-
Original title: load error when you try to load Halo 2
People at Microsoft, I have a problem trying to load Halo 2 on my dv7 Paviliaon with Vista and the 2.8 GB Intel Centrino 2 processor. When I try and load the game, I get and error stating: "the files are missing or damaged in the installation directory. A few important files required to run this game are missing from the installation directory. "It bothered me for several reasons. One: the disc that I use is an original disc out of the box so hsould have no problem. Two: the game has been loaded previously on the same computer without apparent problem at the time. It has been deleted (don't remember why) and when I tried to reinstall, the error came. Three: I did as recommended and updated all programs and drivers, nothing works. So my question is, how do I reinstall Halo 2 and what this problem will arise if I decide to buy and load Halo 3?
Thank you for your time in advance.
Hello
As you are facing problems with Halo 2, I suggest you to refer the link for better support:
-
Import format PDF (bookmarks) from one doc to another
I have belileve the instructions in the user manual are incorrect. Import formats PDF (bookmark definitions) to a doc to another (or a book) does not work.
What is the help file say?
File > import Formats > paragraph Formats worked for me.
-
Concatenation FDM Import Table script
Hi all
First post here, so let me know if I'm making mistakes or leaving out critical information. I'm trying to use FDM for importing a pipe delimited text file, use the mapping feature, and then export the new data to a .txt file. The problem is that the entity on the finished side dimension must be a concatenation of the fields of the entity and the division. What I tried to do is to write a script for the field of the entity on the tables import screen.
Function Div_Ent_Comb (lngCatKey, dblPerKey, strLoc, strWorkTableName)
'------------------------------------------------------------------
"Integration oracle Hyperion FDM IMPORT script:
'
"Created by: cwinslow"
"Creation date: 2014-10-09 15:34:39.
'
' Object:
'
'------------------------------------------------------------------
'Set variables '.
Dim strCombination As String
Dim strDivision As String
Dim strEntity As String
' set where the combo will go
strCombination = Trim (DW. Utilities.fParseString(strRecord, 29, 8, "|"))
"Store column 7 of 11 of a delimited file
strDivision = Trim (DW. Utilities.fParseString(strRecord, 29, 5, "|"))
"To store the column 8 of the 11 of a delimited file
strEntity = Trim (DW. Utilities.fParseString(strRecord, 29, 8, "|"))
strCombination = strDivision & strEntity
End If
End Function
Error when importing is as follows:
Error: An error occurred importing the file.
Detail: Object Variable or With block variable not set
What I want to happen is when I import the file, is for the entity column show the result of the concatenation before going through the validation part.
If you're just trying to concatenate two fields to use as a source for a mapping for the entity dimension, there is a much easier way to do this without script. In your import format to create two entries for the target dimension i.e. entity. The first line contains a reference to the field of the entity of your source (data field 8 of 29), the 2nd line will contain the reference to the field of the Division of your source (data field 5 of 29). If you do this FDM will automatically concatenate the 2 fields together for you.
-
Ambient light will not import my images. (it was working fine before)
Hi, I have light Room 5.7 on a MAC and use a Canon 6 d. I'm not able to import photos.
It worked fine until the weekend when I tried to download multiple images.
The message unable to read the files.
I can export images but not import.
I have tried to import recent images I placed in the files on the desk top with same messages could not read.
Tit images can be dragged the device turned off and on the desktop and even Lightroom will not import them. Any idea? Please notify?
I'm not sure if it's a destination question I recently tried to change all my setting to 'restore' and that has not worked.
This message means that you don't have write access to the folder you are trying to copy to importing. You will need to change the permissions there to be read and write.
HAL
-
Could not import a video file that works when you export my project as a .air file
I am trying to create a project to be exported to a .air file which will include videos. This file will be required to work offline so add a streaming video it with Adobe Media Server is not for me. Video files in Animate must be linked and play (with no internet access) of the file.
I tried to import files video .mp4 to the project but they do not seem to be visible when I export.
I did some research and it seems to work only with the help of .flv / .f4v files (which I cannot make out Adobe as they removed this option now). I tested this theory with a .flv file and it seems to work correctly (with the exception of my massive chronology!)
Anyone know a way around this or could suggest that I could hurt?
It seems strange that Adobe would rename Flash to animate and then do not working not not with all other files outside of la.flv/.f4v which they now won't let go.
Hello
Import of video H.264 in Animate is a design-time only feature that allows you to use videos as a guide to sync your animation on the stage. However if you want to embed the video in the output, please convert your videos to flv or f4v using Adobe Media Encoder CC (7.2).
You can still install Adobe Media Encoder CC (7.2) by installing Flash CC option PREVIOUS VERSION creative cloud - download and install Adobe Creative Cloud applications
Thank you!
Mohan
Maybe you are looking for
-
Upgrade a card mother a6700y?
I recently got a new processor, but it does not match the plug that I currently have. So I need to find a new motherboard, but I've never replaced the one in front. The sockets on the back must match on the new motherboard? I'm looking at that, they
-
Satellite A100 - is compatible Ram 667 Mhz module
My question is if the memory module PA3512S-1M1G (bus 667 MHz) will be fully compatible with my A100-906 and won't have any problematic cooperation with my 1 GB ram PA3511U-1M1G (bus 533 MHz) base. Toshiba site shows that PA3512S-1M1G is not compatib
-
Hello I bought a new Tablet HP Signature of flow on the Microsoft Store online April 1. I registered it with HP shortly after I have received. Now the audit online guaranteed HP tool says it was registered on 10 November 2014 and the warranty expires
-
Photosmart HP 7520: HP Photosmart 7520 black does not print
Message from the printer indicates low black & while a replacement cartridge was ready for installation. When no black was printing, replaced by a new HP black cartridge. After several cleanings, etc, no black is printing. Had to change document to t
-
Problems after upgrade to 8.1 on TPT2 Win
I just updated my TPT2 to Windows through Windos update official store 8.1 of the. Fortunately I do have problems with the display driver crash, like many other users to describe. #1 the Internet Explorer search results (both, the Metro and the Deskt