Here is the deal, I am dealing with some really shoddy output, and no I can't correct this... it's not my data. I just have to work with it.
Here is what I want to do, because this needs to kill two birds with one stone.
I need to use VLookup to look up a ticket, once it looks up the ticket it needs to output a date. The date though is stuck between a universal "date" string...
2019-06-10T17:20:28+00:00
This string is in tab Ticket_Import in row O.
Now, I need to translate to a date that can be later sifted through and put into a chart. The only way I can figure out to do this is using DATE()
Now, here is my problem. I have figured out how to do it...mostly. I am just getting the wrong date back in return, I think it's skipping the data and just saying "Good luck jr." in it's own way...
Here is my formula:
=XLOOKUP(A1261,Ticket_Import!B:B,DATE(LEFT(Ticket_Import!O:O,4),MID(Ticket_Import!O:O,6,2),MID(Ticket_Import!O:O,8,2)),"Empty")
Now, I took this one specifically because I need the date to show up so it will be searchable, which I am not even sure if this will work or not.
The XLOOKUP is searching for the number in A1261, which is 2690.
2690's O row output is
2019-06-10T17:20:28+00:00
Now, when I use this script I wrote it shows as an end result 2019-12-31 instead of 2019-06-10
Which is telling me it can't output properly...
Can someone help me out with this and explain or show me how to get this actually working properly?
Like I said, I can't edit the raw data, but I can make the data output be whatever it needs to be to make this work... as long as I can understand it and reproduce it, because I have to do this over 4,000 more times...
Realistically, once this is done I am going to be copying and pasting the output anyway through a VBA script so that this will not be such a resource hog in the future. I am playing catch up to something that needed to be done ages ago...
Any help would be greatly appreciated.
Thanks!
Solved it...! (YAY ME!)
Ok, I know immature, but this was causing me no end of grief...
The proper code is:
=XLOOKUP(A1261,Ticket_Import!B:B,DATE(LEFT(Ticket_Import!O:O,4),MID(Ticket_Import!O:O,6,2),MID(Ticket_Import!O:O,9,2)),"Empty")
I had an improper mid alignment for the day.
Thanks for everyone that had a chance to look at and and scratch their heads for a minute or two... either way, This is also good for people to use later if they need to make it work for them as well!
Related
Sorry in advance if I seem kinda clueless, I just started using puppeteer yesterday and I’m inexperienced with this kinda stuff.
I’m trying to check if a certain page (opened with puppeteer) has the phrase “hello” for example, keep in mind that I know the XPath of the text (if it exists). I’ve tried .waitForXPath() but I can’t seem to get it to work. Is there an easier function for this?
(await page.content()).match('hello')
That depends on what you typed into .waitforXPath() method.
I can imagine this can work:
await page.waitForXPath("//*[contains(text(), 'hello')]");
But it might be slow because all texts of all elements will be searched. It's better to narrow down the search to e.g. some elements. Unfortunately you don't provide more specifics, so I can't help you there.
I have a question about using a certian drools functionality in drools decision spreadsheet, that would help a lot in reducing the files and making them more readable.
I can't add more than two links so please downlad this .zip file that includes:
Version1.PNG, Version1.drl, Version2.PNG, Version2.drl, Version3desired.drl
http://s000.tinyupload.com/?file_id=89653236807266194978
So here is the sample rule that we are using right now (something similar)Version1.PNG
And this when converted to a drl gives us the following 193 line long drl file. (Version1.drl)
It is ok and it works well, but after some research we found out we could use the "extends" functionality in drl.
And it works in a drl, what I would like to know is how would I use it in an Excel spreadsheet?
I designed the rule in this way: Version2.PNG
Clearly this is not how "extends" should be used in Excel, since this returns the following drl (Version2.drl)
You can see the extends is inside the "" of the rule name. Makes sense I guess, what I woudl like to know however is, how would I use it correctly? a seperate column? That didn't work, at least not the way I did it.
Does anyone know how It should be done?
The correct DRL that should be made after the Excel is converted is this: (Version3desired.drl)
Thank you for any help :)
Cheers!
There is no gain in using extends with spreadsheets in the way you describe it in your question.
I suggest that you stick to the spreadsheet layout shown in Version1.png. If data entry personnel complains about the dull repetition of 1/7/30 in oodles of rows, teach them how to join cells so they need to type each value only once.
I tried pressing f2 to get the VBE thingo open and it just looks like jibberish to me.
I need something nice and simple which gives me a heirachy of what key words to use and where to put the dots so that I can do what I need to do and start learning this lanauge.
h = Worksheets("name_lists").range("g17").Offset(down, 0).Value
I don't know what worksheet is ? Is it a class with object range calling method offset ?
I need some sort of a resource to see what functionality is available but I can't make VBE do what I want.
Can someone please help me.
Thanks.
What you are asking for is at http://msdn.microsoft.com/en-us/library/office/ff194068(v=office.15).aspx. This should help you with documentation about individual objects and their properties/methods.
As for what functionality is available: (just about) everything you can do with the Office suite can be accessed through VBA. A good first step is to record a macro, and then try to follow the generated code. The caveat with that approach is that the recorder LOVES to use .Select and Selection., which is generally bad practice.
And, when you have a specific question you can't figure out, ask it here.
I have to fix the problem in the title and after one day of research I realy don't know what else to try, what else to google ;)
The topic is discussed in an IBM TechNote.
But this answer isn't enough for me. I really need a workaround!
My question: Can I 'get between' the User clicking the 'Copy as table' and the actual copying of the table?
I see two ways of solving my problem (I don't know how to implement them):
If I just could show the user a Messagebox 'Use our own export agent' that would be great.
If I could convince Notes to just copy each document only once that would be even greater.
If I should make my question more precise, just ask. I will gladly edit it!
Every answer would be highly appreciated. Out of the box thinking, other approaches, I like to hear your opinion!
Friendly Greetings
Josi
Unfortunately there is no way to hook in and alter the results of the Copy Selected as Table method. If it is possible to show an "Export Friendly" view that is not categorized, that is one way to solve the problem.
I'm not sure how useful it will be to you, but many years ago I wrote a sample project for exporting views to Excel, and that should handle categorized views properly. There are surely other options available by now too (though I'm not familiar with them).
<div id="temp_1333021214801">
<input type="text"/>
</div>
$browser.text_field(:xpath,".//*[#id='temp_1333018770709']/input").set("apple")
I am getting error "unable to locate element", because the ID changes dynamically.
Please help me to set the text in the text field.
It seems like your dynamic id is temp_ so this should do it given information above:
browser.div(:id, /temp_\d+/).text_field.set 'something'
Issues with my solution is that it assumes id will always be temp_ regex matching any number set consecutively, which seems to be the case with your sample above. Also, it assumes there is no other div(:id, /temp_\d+/) combination in the DOM of that page, most likely should not be an issue.
If you have dynamic IDs I can suggest the following:
Code to object counts. For example
$browser.text_field(:index => 2)
gives the third text_field on the page.
Code to what is around the thing you're trying to find.
$browser.div(:name => 'mydiv').text_field(:index=>2)
gives the third text field in the div called 'mydiv'.
HOWEVER
If your front-end is less-than-testable in this way I highly suggest you put time into thinking over your commitment to automated testing in the first place. Any minor change to the software is going to have you working until 9pm pulling your hair out and rocking back and forth as you update all your scripts, so unless code maintenance is your weekend hobby think about semi-automation or exploratory testing or manual scripts. Talk to development (whomever that might be. It might be you!) or the higher-ups (unless that's you too) to see if it can be made more testable. Also don't use xpaths unless you take some deviant pleasure in it.
Hope that was helpful, I can't do anything specific without the source HTML.