How can I retrieve items with an empty field?

More
6 years 2 weeks ago #78044 by grabit
I want to find in the backend a list of items that have not yet info in a specific field.

Is it possible?

For instance I am looking for items where the international address is still empty.

Thanks for your help.

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
6 years 2 weeks ago #78049 by grabit
I am pushing top this question because I need to find this issue in more than 1000 items.

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
6 years 2 weeks ago #78051 by micker
i don't think ...
maybe you can add filed in item list bakend

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78101 by grabit
Hi Micker,

I am lost with this issue.

My idea was to store properties as field for the "longitude" in a text field called "Longitude"

The create a radio-button field "ismapset" with values 0 for no and 1 for yes and then make an automatic value creation with the prop version in php.

Here is my code
Code:
<?php $F = & $item->fields; if ( isset($F['member-longitude']) ) { $vals = "0"; } else { $vals = "1"; } return $vals;

The problem is that the code returns always "0" in both case empty or not.

Where is my mistake?

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78107 by micker
try !empty instead of isset

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78108 by grabit
Still 0 (no) as answer.

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78110 by micker
did you do a dump of $F = & $item->fields; ? to check more your value ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78111 by ggppdk
Hello

you want an SQL query ?

- if no value was added in DB an SQL query is a simple / easy solution to find them using a "LEFT JOIN"

- if these items have an address partly filled (but miss some info (like e.g. "business name" property) ) then it you will need a PHP script that gets all items and loops through them


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78113 by grabit
I am not fluent with such coding. How can I do that?

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #78116 by grabit
A sql query would be perfect, I just need to know if the field has ben completed or is still empty.

An Apple a days keeps the doctor away

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save