DeathgripVT
Posts: 5
Joined: Tue Dec 01, 2020 3:41 pm

Clickable List from DB Query Mapping

Hello,

I am trying to create a clickable list for an Ionic 4 app, that will pull a label value, to be used to direct the user to the correct page on click. I am creating the list by mapping a DB query to the list. On the click I want to pull the value of the ListItemLabel (which will be the profile name), and based on that direct the user the correct page. Screen shot of the mapping is attached.

Any help is appreciated.

Attachments
listMappingImage.PNG
listMappingImage.PNG (65.46 KiB) Viewed 7277 times
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Clickable List from DB Query Mapping

Hello,

1 Please move the mapping array from AvailableProfileListI to AvailableProfileListItem

  1. Please use the following code on the click event of the AvailableProfileListItem to read the current item:

Code: Select all

 currentItem.itemData
DeathgripVT
Posts: 5
Joined: Tue Dec 01, 2020 3:41 pm

Re: Clickable List from DB Query Mapping

Thanks for the quick response Serhii,

I change the mapping as you instructed, but not 100% on the click event. I attached what I did for the AvailableProfileListItem click event. Said to Run TypeScript, created a variable val to the code you provided, then just presented a toast with the val as the text, to see if I could see what val was assigned for testing. I get an undefined though. Am I not using the click event correctly for Ionic 4 lists?

Attachments
listToast.PNG
listToast.PNG (25.03 KiB) Viewed 7270 times
listClick.PNG
listClick.PNG (120.67 KiB) Viewed 7270 times
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Clickable List from DB Query Mapping

Please share (https://docs.appery.io/docs/teams-sharing-with-support) your app with support@appery.io and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue

DeathgripVT
Posts: 5
Joined: Tue Dec 01, 2020 3:41 pm

Re: Clickable List from DB Query Mapping

Thanks Serhii,

I have followed your instructions and made the app available to support and sent an email with the requested information. I will see what they come back with and will hopefully be able to post the solution to this post for other users.

-John

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Clickable List from DB Query Mapping

Please use that currentItem.itemData on the click event Run TypeScript, not in the property (click)

DeathgripVT
Posts: 5
Joined: Tue Dec 01, 2020 3:41 pm

Re: Clickable List from DB Query Mapping

Thank you Serhii,

I followed your instructions on our last email and was able to get the list click event to work properly. I have attached a screen shot of Run TypeScript code I used for other users.

-Instructions from last support email:

Serhii Kulibaba (Appery.io)
Dec 8, 2020, 9:46 GMT+2
Please print the full object here to see its value
alert(JSON.stringify(currentItem.itemData));
It contains all properties from the database, so I think you need to use something like
currentItem.itemData.profileName
If the database contains that property

  • Thank you again for all the help.

-John

Attachments
listClickCode.PNG
listClickCode.PNG (55.46 KiB) Viewed 7237 times
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Clickable List from DB Query Mapping

Thank you for this update! Glad it works now!

JoshuaEnrot
Posts: 1
Joined: Thu Jan 21, 2021 12:46 am

-

Im using a query using DC_AdsStatement that does a SELECT INTO a file which works great except the files selected from and created remain open, but not as open work areas. How do I release these files? Is DROP TABLE the proper way or is will that restrict future use?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: Clickable List from DB Query Mapping

Hello,

Could you please provide us with more details, screenshots, or exact steps to reproduce this problem?

Sorry, but the issue is not clear

Return to “Issues”