{"id":4558,"date":"2019-07-27T13:50:34","date_gmt":"2019-07-27T11:50:34","guid":{"rendered":"https:\/\/www.sendasoft.com\/cual-es-la-diferencia-entre-las-propiedades-value-y-asvalue\/"},"modified":"2020-08-16T13:29:48","modified_gmt":"2020-08-16T11:29:48","slug":"cual-es-la-diferencia-entre-las-propiedades-value-y-asvalue","status":"publish","type":"post","link":"https:\/\/www.sendasoft.com\/es\/cual-es-la-diferencia-entre-las-propiedades-value-y-asvalue\/","title":{"rendered":"\u00bfCu\u00e1l es la diferencia entre las propiedades Value y AsValue?"},"content":{"rendered":"<p>Se puede usar tanto <strong>Value<\/strong> como <strong>AsValue<\/strong> para obtener el valor de un control, aunque tambi\u00e9n se pueden usar para asignar un valor a un control concreto, sin embargo, notar\u00e1 las diferencias entre ellos al obtener los valores.  <\/p><p>Cuando usa <strong>Value<\/strong> para conocer el valor, esta propiedad puede devolver un valor NULL (cuando el control no contiene nada), sin embargo, cuando usa <strong>AsValue<\/strong>, esta propiedad nunca devolver\u00e1 un <strong>NULL<\/strong>, por ejemplo:  <\/p><ul class=\"wp-block-list\"><li>Un control con DataType <strong>dtyString<\/strong> sin valor devuelve:<ul><li><strong>Value = NULL<\/strong><\/li><li><strong>AsValue = \u00bb<\/strong><\/li><\/ul><\/li><li>Un control con DataType <strong>dtyInteger<\/strong> sin un valor devuelve:<ul><li><strong>Value = NULL<\/strong><\/li><li><strong>AsValue = 0<\/strong><\/li><\/ul><\/li><\/ul><p>M\u00e1s tarde, podr\u00eda usar la funci\u00f3n <strong>JfVarIsNull<\/strong> (<strong>JfUtil<\/strong> unidad) para saber si <strong>Value<\/strong> es\/o no es <strong>NULL<\/strong>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Se puede usar tanto Value como AsValue para obtener el valor de un control, aunque tambi\u00e9n se pueden usar para asignar un valor a un control concreto, sin embargo, notar\u00e1 las diferencias entre ellos al obtener los valores. Cuando usa Value para conocer el valor, esta propiedad puede devolver un valor NULL (cuando el control [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5053,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[63],"tags":[71,76,75,77,72,74,73,70],"class_list":["post-4558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jfcontrols-es","tag-asvalue-es","tag-dtyinteger-es","tag-dtystring-es","tag-jfutil-es","tag-jfvarisnull-es","tag-nil-es","tag-null-es","tag-value-es"],"_links":{"self":[{"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/posts\/4558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/comments?post=4558"}],"version-history":[{"count":2,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/posts\/4558\/revisions"}],"predecessor-version":[{"id":5416,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/posts\/4558\/revisions\/5416"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/media\/5053"}],"wp:attachment":[{"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/media?parent=4558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/categories?post=4558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sendasoft.com\/es\/wp-json\/wp\/v2\/tags?post=4558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}