Syteline 8.03 retrieving value/refresh field before saving new record to use for a comparison on another field

Does anyone know the trick to retrieving/displaying a value in a form before saving the record (outside of deriving the field)?

I can get the value, but it will not display until Save; and I need it available before saving in order to perform a 'required when' on a separate field.

If I derive it, I can display it, but then the field I need to have 'required when' will not show as required until Save.

The requirement is that if an Item has Control checked (via a checkbox on Items form), the other field is then required on the new form.

If it is not checked, the other field is not required on the new form.

I have tried:

1) Deriving the field and using required when, but does not show as required until after Save

2) using an Event with Form Script and Stored Procedure to retrieve/display the value as well,

But again the field will not display until Saved, which would require the User to go back to the now required field (that I want to show as required prior to Save) and save the form again.

  • Is this field on a different form or the same form (items)?
  • In reply to 1362426:

    Different form
  • In reply to 1719269:

    I would have done it like you did with the SP. When you are using the event with the SP, are you having the SP return a value into a variable that is tied to a hidden checkbox component? I would have the hidden checkbox component be my "trigger" to show the field you want or not. I have done this before and it has worked.
  • In reply to 1362426:

    Yes, I am doing it this way with my "trigger" on the required Item, when item changes, it kicks off the event on Data Change. The item determines whether the control has a check box or not. Again, I need the result to show prior to saving, not on save. It is not how to get the result, it is how to get it to show PRIOR TO SAVE that I am struggling with.
  • In reply to 1362426:

    I found this, but not sure where to add it on the form.

    Easy way to link a show only field to Form:

    Let say you want to show item material status in Item Availability Form, you may just create a new edit field in form, then bind the form component to

    COLLECTION(SL.SLItems(PROPERTY(Stat) FILTER(Item = FP(Item)))) .

    Please note that if you want to do this in grid column, since the value is not in collection, so the grid column would be blank initially.  Only when you click on a row, the column value would show.  

    Does anyone know where you would add this code?

  • In reply to 1719269:

    This method did not provide actual binding to allow further requirements to validate against...back to the drawing board.
  • In reply to 1719269:

    Can you assign the value of the COLLECTION() binding to a variable on the form, and then do your validations against the variable value?
  • In reply to 1362069:

    Not sure how to assign it to the variable if it is not binding. The above method displays only, does not bind.