1 2 Previous Next 15 Replies Latest reply on Jun 11, 2015 1:35 PM by philmodjunk

    Formula producing "?"

    Matty_1

      Title

      Formula producing "?"

      Post

       

      Hi there,

      Maybe I'm losing it but I thought that the formula below worked previously but it certainly doesn't now.  What I have is a function that copies over information from another table if you select it's ShippingID.  The fields with information that has been copied over then becomes greyed out using visibility and you can no longer access the field.  If you want to manually change parts of the information once it's been copied over you have to select the manual entry box.  Once you do that - visibility allows you to gain access to the field and I want the old information to stay and let the user clear or modify what's already there.  That's what I'm trying to attempt in the first line of my case but it returns a "?" instead of leaving the fields content intact and I don't know why.  The other two lines appear to be working as they should.

      Case ( 

      ManualEditCity = True ; Self ;

      IsEmpty (_kfnShippingID) and ManualEditCity = False ; "" ;

      not IsEmpty ( _kfnShippingID ) and ManualEditCity = False ;  Locations_People::City

      )

        • 1. Re: Formula producing "?"
          philmodjunk

          Check to make sure that your field is wide enough to display the value returned. You may need to make the field wider.

          • 2. Re: Formula producing "?"
            Matty_1

            It's definitely wide enough.  Could I missing something with the self function?

            • 3. Re: Formula producing "?"
              philmodjunk

              Is this a text field with the above expression set up as an auto-enter calculation?

              • 4. Re: Formula producing "?"
                Matty_1

                Yes it is.

                • 5. Re: Formula producing "?"
                  philmodjunk

                  then self is used correctly in this expression.

                  is the "Do not replace existing value" option selected or cleared?

                  • 6. Re: Formula producing "?"
                    Matty_1

                    the strange thing is that it puts an actual question mark in the field.  When I go tab into it the curser is placed beside the question mark so if I don't delete it I end up with a question mark and then whatever I type.

                    • 7. Re: Formula producing "?"
                      Matty_1

                      it is cleared.

                      • 8. Re: Formula producing "?"
                        philmodjunk

                        Do you get the same results from a brand new record?

                        Adding or a changing an auto-enter calculation will not automatically update data in existing records so that might explain what you are seeing. But if you create a brand new record and you still get the question mark, something else is the source of that issue.

                        • 9. Re: Formula producing "?"
                          Matty_1

                          hmmm depends what you mean.  I've created a whole new customer and location to copy from then tried to copy over the information.  all looked good.  I then selected the manual entry check box and it popped in a question mark.  Unselected the manual entry check box and the copied info returned.  Reselected and the question mark was back.

                          Is that what you mean?  I can only test this if I'm wanting to copy information from another record and want to modify one aspect of it.

                           

                          • 10. Re: Formula producing "?"
                            Matty_1

                            Something is really wrong ... even this produces a question mark rather then the word "test" and doesn't clear it when the manual edit is empty.

                            /* Case ( */

                            If ( ManualEditAddress = True ; "test" ; "" )

                            /* IsEmpty (_kfnShippingID) and ManualEditAddress = False ; "" ;

                            not IsEmpty ( _kfnShippingID ) and ManualEditAddress = False ;  Locations_People::Address ;

                            ) */

                            • 11. Re: Formula producing "?"
                              Matty_1

                              If I click the manual edit box over and over very quickly, ever now and then I see the word test show up but then gets replaced by the question mark right away.

                              I've reboot the server to see if that would for some reason fix it.  Still the same.

                              • 12. Re: Formula producing "?"
                                philmodjunk

                                Is this a text field or a field of some other data type that you've set up with this auto-enter calculation?

                                You may need to share the file so that others can examine it in the context of your database design.

                                But before you do that, could there be a script trigger set on the field or the layout that is interfering?

                                • 13. Re: Formula producing "?"
                                  Matty_1

                                  CRAP!  That was it.  I was sure I checked for scripts but clearly I didn't look at every possible aspect and found a conflicting script.  All good now.  Thank you Phil!

                                  • 14. Re: Formula producing "?"
                                    Matty_1

                                    Now I've run into another issue and somehow stumped.  The second line in the code causes the field to clear itself if no shipping ID is selected and the manual edit is false.  That is as soon as I try to leave the field in a full manual entry record, it just blanks itself. The problem is that if there is no shippingID the manual edit should remain false and I want the fields to clear themselves if a shipping ID is unselected.  are triggers my only way out or can you suggest a clever way of building it into my auto enter function?

                                    Hope I'm making myself clear enough indecision

                                    Case (

                                    ManualEditAddress = True ; Self ;

                                    IsEmpty (_kfnShippingID) and ManualEditAddress = False  ; "" ;

                                    not IsEmpty ( _kfnShippingID ) and ManualEditAddress = False ;  Locations_People::Address ;

                                    )

                                    1 2 Previous Next