Monday, 29 October 2018

Sort / Order a container in ASC order in AX 7 / D365 F&O X++

Below is the job which will help for sorting the values in a container. 
static void SortContainer(Args _args)
{
container con = [5,1,2,"Rahul",9, "Kiran", NoYes::No];
str temp1;
str temp2;
int i;
int j;
container sorCon;
;
sorCon = con;
// Sort the container
for (i = 1; i <= conlen(sorCon); i++)
{
for (j = i + 1; j <= conlen(sorCon); j++)
{
temp1 = conpeek(sorCon, j);
temp2 = conpeek(sorCon, i);
if (temp1 < temp2)
{
sorCon = condel(sorCon, j, 1);
sorCon = conins(sorCon, j, temp2);
sorCon = condel(sorCon, i, 1);
sorCon = conins(sorCon, i, temp1);
}
}
}

conview(sorCon);
}

23 comments:

  1. I just want to let you know that I just check out your site and I find it very interesting and informative.. shipping container brisbane

    ReplyDelete
  2. This blog is really great. The information here will surely be of some help to me. Thanks!. shipping containers for sale brisbane

    ReplyDelete
  3. I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. cairns shipping containers

    ReplyDelete
  4. hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. shipping containers cairns

    ReplyDelete
  5. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. buy shipping container cairns

    ReplyDelete
  6. This is a brilliant blog! I'm very happy with the comments!.. shipping container cairns

    ReplyDelete
  7. hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. shipping containers gold coast

    ReplyDelete
  8. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. buy shipping container gold coast

    ReplyDelete
  9. Thanks for every other informative site. The place else may just I get that kind of information written in such an ideal means? I have a venture that I’m just now operating on, and I have been on the look out for such information. shipping container gold coast

    ReplyDelete
  10. Thank you for some other informative website. The place else may just I get that kind of information written in such a perfect method? I have a venture that I am simply now running on, and I’ve been at the glance out for such info. shipping containers for sale gold coast

    ReplyDelete
  11. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. abc containers

    ReplyDelete
  12. I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. 40ft shipping container port

    ReplyDelete
  13. I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. 20ft container for sale

    ReplyDelete
  14. I just want to let you know that I just check out your site and I find it very interesting and informative.. 20ft container

    ReplyDelete
  15. I gotta favorite this website it seems very helpful . 20ft container sales

    ReplyDelete
  16. I am happy to find this post Very useful for me, as it contains lot of information. I Always prefer to read The Quality and glad I found this thing in you post. Thanks abc container hire

    ReplyDelete
  17. I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot! 23 foot shipping container for sale

    ReplyDelete
  18. I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!. 23 foot shipping container for sale

    ReplyDelete
  19. On this page, you'll see my profile, please read this data. Samsung Galaxy S21 5G Price

    ReplyDelete
  20. That is the right weblog for anybody who wants to search out out about this topic. You understand a lot its virtually hard to argue with you (not that I truly would want…HaHa). You definitely put a new spin on a subject thats been written about for years. Great stuff, simply nice! cheap shipping containers

    ReplyDelete
  21. You created some decent points there. I looked online for the issue and located most people is going as well as with your web site. wss kseb online payment

    ReplyDelete
  22. Your Blog is very nice.Wish to see much more like this
    Breaker Bar

    ReplyDelete

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...