AnsweredAssumed Answered

Help with LastMessageChoice Script

Question asked by kmcevers on Apr 12, 2018
Latest reply on Apr 13, 2018 by planteg

Beginner/mid-level user here (and first time visitor) with an import/field mapping issue. Please be gentle with me :/


I am importing file data from test results that come to me from an external source via excel .xls. Field mapping and scripts export the data with completely different field names in order for the data to sync with an uploader to a cloud system. FM does this nicely with minimized room for errors. The user imports, checks the mapping, runs a script, done.


My one problem is that two different excel sheets provided by the external source label two fields with identical field names. I cannot request that they change the fields nor do I want to rely on a user to change anything in the excel files prior to upload into FM. Here then, is what I have surmised thus far to do and where I need help:


I currently have the "generic" field of Test Date mapping to itself; however, I have differing fields to which it must ultimately map of "XDate" and "YDate," depending on which test was taken.


Once the data is imported, the user will run one script -- a "Show Dialog" script that I have created which asks, "Is this a X Test or Y Test?" with buttons for X Test and Y Test. Ultimately, as soon as they choose one or the other, I would like FM to change the export field of "Test Date" to XDate or YDate respectively before it exports the file. I tried to fiddle with the If [Get(LastMessageChoice) = 1 etc., etc., but for some reason I am not entering what I need in order to change that fieldname.


Would someone please help me with writing the remainder of the script that I need before exporting the data?


Thank you.