Fritz Pabst Posted September 24 Share Posted September 24 Hello, Trying to test out the readbyquery for PJESTIMATE and looking for all ISPRIMARY is true. I return results if i remove the query but when i add the below line it returns zero results. Not sure what i am missing with this. I have records that have isprimary set to true. Thanks for the help. <query>ISPRIMARY = 'true'</query> <Field> <ID>ISPRIMARY</ID> <LABEL>Primary</LABEL> <DESCRIPTION>Primary</DESCRIPTION> <REQUIRED>false</REQUIRED> <READONLY>false</READONLY> <DATATYPE>BOOLEAN</DATATYPE> <VALIDVALUES> <VALIDVALUE>true</VALIDVALUE> <VALIDVALUE>false</VALIDVALUE> </VALIDVALUES> <ISCUSTOM>false</ISCUSTOM> </Field> Link to comment Share on other sites More sharing options...
Solution Lee Savidge Posted September 26 Solution Share Posted September 26 Try T or F, or, 1 or 0 1 Link to comment Share on other sites More sharing options...
Fritz Pabst Posted September 26 Author Share Posted September 26 Hey Lee, thanks for replying. T or F worked. How did you know this? I have been banging my head looking at all the documentation and see nothing in regards to T or F. I was basing everything off the documentation. "Specifies whether this is the primary estimate for the project. Use true for primary, false otherwise. A project can have zero or one primary estimates and multiple non-primary estimates. The first estimate for a project is automatically set as primary when it is created. To set another estimate as primary, update the first estimate to set ISPRIMARY to false and then update the desired estimate to set it to true. (Default: true for the first estimate created for a project, false otherwise)" Also, the fact that TRUE or False doesn't return records is ridiculous. Thanks again for your reply. 1 Link to comment Share on other sites More sharing options...
Lee Savidge Posted September 27 Share Posted September 27 14 hours ago, Fritz Pabst said: Hey Lee, thanks for replying. T or F worked. How did you know this? I have been banging my head looking at all the documentation and see nothing in regards to T or F. I was basing everything off the documentation. "Specifies whether this is the primary estimate for the project. Use true for primary, false otherwise. A project can have zero or one primary estimates and multiple non-primary estimates. The first estimate for a project is automatically set as primary when it is created. To set another estimate as primary, update the first estimate to set ISPRIMARY to false and then update the desired estimate to set it to true. (Default: true for the first estimate created for a project, false otherwise)" Also, the fact that TRUE or False doesn't return records is ridiculous. Thanks again for your reply. Trial and error. I've hit this before in other places. The other thing I find hard to handle is that sometimes a boolean field can be null/empty, so it doesn't match true or false and there are occasions where you need to check to see if the field has a value as well. Glad it helped. I couldn't recall if I'd used t/f or 0/1 in the past 🙂 Lee 1 Link to comment Share on other sites More sharing options...
Recommended Posts