I have created small function which is fetching data from Dynamics 365 Number sequence table which is working fine. The problem I have is that the end result instead of numbers "123456" is being displyed with "#####123456".
It is Text function and automatically place holder is being assigned.
Please see the below screenshot:
The variable which filed is displying is "GlbNextSalesOrdeLines" , the Format of the Number Sequence is "######" , but this is why i have place the Replace function as well.
Could anybody pointout where is my mistake in the formula?
Solved! Go to Solution.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255 ,
Thanks for the responce.
The suggested formula breaks as Len expects text, where in the sequence table are number (at least this is the error).
Break-down if my formula is:
- setting variable name "GlbNumberSequenceFormat" , which is fetching the format which is "######", data source is "SequenceTables" and in it i am looking for the NumberSqeuenceCode "Inve_162"
Meaning that this will register the value of the format being "######" - 6 digits preconfigured in Dynamics365 for finance.
- setting variable name "GlbNextNumber" for LookUp in the data soruce which is "SequenceTables" for the Sequence code of "Inve_162" for the "Next" number which will be generated. The next number in the sequence table filed is dispalyed with 5 digits only. But in the field of Sales Orders it should be 6 digits as per the format, so the next line is for that
-setting variable name "GlbNexSalesOrderLines" where I want to replace the value of "GlbNumberSequenceFormat" variable and add extra digit of 0 to it. , so it gets correctly populated in the Sales order filed and the systems recognizes it as valid one.
Let me know if my explanation of the formula is not clear, I will try to elaborate.
Hi @yashag2255 ,
Thanks again, I guess my skills with formating need some work still.
So the formula works, but now i am receiving as result one "#" , which is less than the previous 5 "#" , but it is still not the value which needs to be displayed.
Basically I looking for way to remove this hastag "#" and I don't know how and why it is appering.
So the "#" is part of the format of the NumberSequence, but I am looking to display on the Next generated value which in the number sequence code is with 5 digits (skipping the "0") and i just need to add 0 in the beginng on of the numeric value, so it will be recognized as valid.
GlbNumberSequenceFormat is used to set the format of the end value, which is predefined in the sequnce table to be "######" which is reading it as 6 digits.
Thanks for poinitng out. Apperantly I was trying to make it more complicated than it should be.
So yeah now it works perfect , no hastags
Thanks again and have a nice day!
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200