0

Questions about writing

The file has been uploaded. Thank you for reply.

9 replies

null
    • Fred
    • 10 mths ago
    • Reported - view

    I'm not sure what you mean by "their order is in a messy".

    Is everything else correct just how they show up in the table?

    Can you sort the table into a view that works for you?

      • gold_cat
      • 10 mths ago
      • Reported - view

       As you can see in Figure 1, the codes for "coffee" are 2 and 22. But in Figure 2, the codes for "coffee" become 5 and 55. How can I correct this problem?thanks

      • gold_cat
      • 10 mths ago
      • Reported - view

       The rest are right.

    • francescostefanello
    • 10 mths ago
    • Reported - view

     the code for the products change day by days? if not, why don't you insert it directly in the products

    table?

    like this:

    i have made some changes, tell me what you think

      • gold_cat
      • 10 mths ago
      • Reported - view

       hi,friend,

      Quantity represents the number of products, which determines how many records inventory needs to generate. This matches the number of codes in each product item. My issue is that the code written to inventory has changed from the code in Detailed. I roughly know that it is a problem with the loop, but I don't know where the error is.

      Thank you for reply.

    • Fred
    • 10 mths ago
    • Reported - view
     said:
    My issue is that the code written to inventory has changed from the code in Detailed.

    Question: Why did you make the decision not to make a reference field in the inventory table to products? It looks like you are trying to create an inventory DB. Have you looked at the Inventory template from Ninox? Maybe you can explain your workflow and we can give you some tips on how to organize the structure.

    I think your issue is with this line:

    let productNumberings := split(text(aa.Detailed.code), "
    ");
    

    Do you need to copy the entire contents of the Detailed.code to inventory.code?

    If so then your code is getting the code from the parent record in storage not the child record in Detailed. Notice that you are referencing the aa variable. Since the line is in the middle of a loop you need to reference the loop variable.

    let productNumberings := split(text(currenRec.Detailed.code), "
    ");
    

    I don't understand what you are trying to do with the split() command? This leads me to believe you only want part of the code. So then my next question why is the data in Detailed.code built in a way that you need to fix it later? Can you make the data simpler so you don't have to massage it later?

    • gold_cat
    • 10 mths ago
    • Reported - view

    thanks,Fred,

    My English is not very good, but I will try my best to express my thoughts clearly.

     said:
    Why did you make the decision not to make a reference field in the inventory table to products?

    "reference field" means the content in ‘’Detailed.code“?I am indeed creating the "inventory DB", because the "Detailed.code" of the product is not known to me until it reaches the warehouse, Because it is unique and not repeated code.

    It's like this.👇

    132298893526864673
    132298892602205405
    132298894522301413
     said:
    Maybe you can explain your workflow and we can give you some tips on how to organize the structure.

    When I get ''Detailed.code'', since it's a whole group of data, all I can think of is to split it with the "split()" command and put it in the into "inventory.code". Because a "code" corresponds to a product. 

     

     said:
    Do you need to copy the entire contents of the Detailed.code to inventory.code?

    I need them to correspond one-to-one.

    The above should explain why I did it this way. Thank you for Fred's guidance. Adjusting according to your method, it seems that I have solved the problem. I have learned a lot.

    (There are time differences between us and my response will be slower)

    • Fred
    • 10 mths ago
    • Reported - view
     said:
    When I get ''Detailed.code'', since it's a whole group of data, all I can think of is to split it with the "split()" command and put it in the into "inventory.code". Because a "code" corresponds to a product. 

    If you want to track multiple codes per product then you may want to consider making a Code table where you track each code in a separate record, related to the record in Detailed.

    Or maybe instead of tracking by product in Detailed you track by code, since that seems to be the more important data point.

      • gold_cat
      • 10 mths ago
      • Reported - view

      I did that.  Check inventory by statistical code.

      A disadvantage of this is that I need to select the code one by one when I ship out. I wonder if there is a more efficient solution.

Content aside

  • Status Answered
  • 10 mths agoLast active
  • 9Replies
  • 101Views
  • 3 Following