Method Community

 

Setting Values for Yes/No Fields

Last post 04-16-2013 1:18 PM by Method_Adam. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-11-2013 8:25 AM

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Setting Values for Yes/No Fields

    I'm currently working with grids for EstimateLines. I'm having trouble setting the value of the IsMarkupPercent field. During the text change for the item field I set the value as IsMarkupPercent = Yes. However, when I make a call to return the value it shows up null, or empty. Later after a Lose Focus on the Quantity field I set the value again with "Yes", made a call and it shows up as IsMarkupPercent = Yes. However, when I check the value again after tabbing into the next field, the value shows IsMarkupPercent = false. Even though it returned a value of Yes, the IsMarkupPercent was never actually set. It just responded with what I recently typed.

    It seems I've tried everything to force IsMarkupPercent to be Yes or true. Am I missing something? Is there some kind of trick to programatically setting Yes/No fields?

  • 04-11-2013 11:19 AM In reply to

    Re: Setting Values for Yes/No Fields

    Answer

    Hi Johnny,

    There are already actions on the text change for Item that sets the Markup % to true if the sales price / cost is greater than zero. Where in the action set on text change are you setting the markup % to 'yes'?  In my testing, it appears that setting the IsMarkupPercent checkbox to 'Yes' doesn't work as intended.  Any value other than True sets it to False.  Only "True" seems to check the box.  Since you're using "yes", my guess that on every call you are resetting the value to False.

    Using Yes or No for checkboxes outside of the grid appear to work.  Could you try using 'True' instead of yes and let me know it works?

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 04-11-2013 3:53 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Setting Values for Yes/No Fields

    Adam,

    I've been attempting to set the value to "True" in order to check the box, but so far to no avail. I managed to generate an internal error that was emailed to Method in the process of my attempts.

    I'm using the "Enter value into field on screen" action and setting the IsMarkupPercent field equal to a type-in value of "True". Was this your approach?

  • 04-11-2013 4:05 PM In reply to

    Re: Setting Values for Yes/No Fields

    Johnny,

    That's exactly the what I did.  On which object and where in the action list did you put the action?

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 04-11-2013 4:34 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Setting Values for Yes/No Fields

    I put it in a couple of places:

    1. In Item->Text Change, followed by a Save Grid and Refresh Grid.
    2. In Quantity -> Lose Focus, followed by Save Grid and Refresh Grid.
  • 04-12-2013 9:43 AM In reply to

    Re: Setting Values for Yes/No Fields

    Answer

    Johnny,

    I added the Save and Refresh grid actions and that seems to be the issue.  Could you remove those actions and try again?  They shouldn't be needed anyways, as the values will be saved when you click the update or save buttons.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 04-16-2013 12:37 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Setting Values for Yes/No Fields

    Adam,

    Sorry it's been a few days since I've been on. I tried this fix and it worked. The Save/Refresh Grid was somehow reverting the change. It works just fine now.

  • 04-16-2013 1:18 PM In reply to

    Re: Setting Values for Yes/No Fields

    That's good to hear Johnny.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
Page 1 of 1 (8 items)