How to get OrderNumber in Sage Accpac after entering order with macro script - vba

I have recorded the process to create an order and quote in Sage ACCPAC, and i put the code in a VB 6 application, it works perfectly and adds a new quote / order. But what i need is that i want to get the generated ordernumber or orduniq within the same code , I want to perform some operations on that quote. But i am not sure, how can i get the information from accpac, as what i have done till now is simply recorded a macro and then copied the code and put it into VB application. I got the session creating code from a site, and made the Macro code dynamic and the application is ready to accept parameters and create an order on that basis , Kindly tell me how can i return the created ordernumber back to the user.
Thanks

Agree with enterland - always good to post code here. However, in this case I know what you're looking for. Once you create the order you can get the order number from your order header view. Along these lines:
OEOrderHeader.Insert
NewOrderNumber = OEOrderHeader.Fields("ORDNUMBER").Value

Related

<screen scraping in uipath> combine split numbers

I would like to screen scrape a few user details including the handphone no. from one application and paste the details into another application. There's a spacing in the handphone no. e.g. 8123 4567. I would like to remove the spacing and paste 81234567 into the other application.
I have use Build Data Table and Write Range to store the captured information in. In the handphone no. screen scrape activity, I did the following additional steps to split the numbers and combine them into 1. It works the first few times but when I tried running the script a few days later, it stopped working. Basically, the handphone no. is not completely copied over. Sometimes it returns as 8123 and sometimes as 812.
Assign
ArrayHandphoneNo = HandphoneNo.Split({" "},stringsplitoptions.None)
Assign
HandphoneNo = ArrayHandphoneNo(0)
Try Catch
HandphoneNo = HandphoneNo + ArrayHandphoneNo(1)
Catches exception
Assign
HandphoneNo = HandphoneNo
May I know what went wrong?
Why you having a workaround. From my perspective you simply need a line of code that is removing all spaces. So you get back the full digit number. So try with this:
myString = myString.Replace(" ", "")
in your assign activity.
Could look like this one:

#Dblookup and formatting on web

I have been developing a web application using domino, therein I have dblookup-ing the field from notes client; Now, this is working fine but the format of value is missing while using on web.
For example in lotus notes client the field value format is as above
I am one, I am two, I am one , I am two, labbblallalalalalalalalalalalalalalalalalalaallllal
Labbbaalalalallalalalalalaalallaal
Hello there, labblalalallalalalllaalalalalalalalalalalalalalalalalalalalalalalala
Now when I retrieve the value of the field on web it seems it takes 2 immediate after 1. and so forth, I was expecting line feed here which is not happening.
The field above is multi valued field. Also on web I have used computed text which does db lookup from notes client.
Please help me what else could/alternate solution for this case.
Thanks
HD
Your multi-valued field has display options associated with it and the Notes client honors those. Obviously, your options are set up to display entries separated by newlines.
The computed text that you are using for the web does not have options like that and the field options are irrelevant because you aren't displaying the field. Your code has to insert the #Newlines. That's pretty easy because #DbLookup returns a list, and if you concatenate a list and a scalar, the scalar will be appended to each element of the list. (Look at the third example under "concatenation, pairwise" here to see what I mean.
The way you've worded your question is a little unclear to me, but what you need in your computed text formula is either something like this:
list := #DbLookup(etc,. etc.);
list + #Newline;
Or something like this:
multiValueFieldContainingListWithDbLookupResult + #NewLine;
I used #implode(Dblookupreturnedvalue;"");
thanks All :)

calling RankToPosition() and _onMoveToPositionClicked

I have a situation where i'd like to enter a "3" into a textbox on a user story grid, call something like RankToPosition(3) to move that user story row to position 3 in the current rank. Within the same grid, the idea is to have a textbox on each row, so the row beneath may have a 4 in there, and when i click SUBMIT, the entire table would be processed by using the numbers in the row textbox and calling RankToPosition(#). This is like the Netflix queue. There have been similar questions on here, but my thought is to just call the underlying method alluded to here as "_onMoveToPositionClicked":
https://help.rallydev.com/apps/2.0rc3/doc/source/MoveToPositionMenuItem.html#Rally-ui-menu-item-MoveToPositionMenuItem-cfg-rankRecordHelper
If i could iterate through the table grid, store initial rank values (i realize they're not just integers), and pick the new text values up, run code to call the _onMoveToPositionClicked beneath the scenes, it may accomplish a bulk rank grid for when users have 200+ items to manage, for instance.
Any insight you have for just calling this in custom code would be helpful. Any solution for representing this functionality would be appreciated. I am currently using Rally 2.0rc3.
Thank you for your time
Is it possible to upgrade to a newer version of the App SDK? 2.0rc3 is a very old pre-release. The latest is 2.1: https://help.rallydev.com/apps/2.1/doc/
In any case, the way ranking is performed is relative to another object via the rankAbove or rankBelow parameters. So given the record you want to rerank:
record.save({
params: {
rankAbove: '/hierarchicalrequirement/12345'
}
});

Infinite Addition Loop

I basically have 4 tags that keep a count of product produced within the company. The problem is that the logic behind these tags is to reset the value when the machine stops. I am not too familiar with coding, but am trying to develop a calculation tag that will just keep a running count without reset. So basically, the number would always escalate.
Tag Names : Filler1Count , Filler2Count, Filler3Count, Filler4Count
This is all done in an application called Historian Administrator. VB code can be implemented behind tags. I will obviously be keeping the original tags, but have the option of making a calculation tag.
Watch for when the number is smaller than the previous poll and store your total in a different variable.
If Filler1Count < LastFiller1Count Then
Filler1Total = Filler1Total + LastFiller1Count
End If
LastFiller1Count = Filler1Count
Total = Filler1Total + Filler1Count

Openrefine not working as expected

I'm very new to OpenRefine, so please bear with me if i have made a simple mistake.
I'm parsing a HTML website to gather some date.
Everything went fine with fetching the individual pages, but now the parsing of the HTML fails.
I'm creating a new column, based on the one holding all the page's HTML. I'm trying to get to the data in a specific DIV[20].
In the"create column based on this column" window it gives me a preview when using value.parseHtml().select("DIV")[20] , which results in exactly what i need... executing it gives me nothing but blank cells.
it even tells me that it is "filling 0 rows with grel:value.parseHtml().select("DIV")[20]"
Any clue what i'm doing wrong here?
You just need to finalize with .toString() to output the JSON.org object AS a string.
This is explained on our wiki here: https://github.com/OpenRefine/OpenRefine/wiki/StrippingHTML#extract-html-attributes-text-links-with-integrated-grel-commands
I also updated the select() function with that example: https://github.com/OpenRefine/OpenRefine/wiki/GREL-Other-Functions#selectelement-e-string-s