Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Portal script problem


jamesñpatrick
 Share

Recommended Posts

Hello,

 

Can anybody help me with this problem. Basically I have 2 tables clients and addresses, I am trying to get rid of the scroll bar in a portal on the clients_anchor table, and instead use radio buttons to select the record in the portal.

 

I seem to have most of it working but when you select add address to the portal the new radio button appears but it doesnt go to the new radio button and when you delete an address the radio button disappears but I can´t get it to select the next record.

 

I have attached a file, any help would be greatly appreciated.

 

Thanks

 

James

Link to comment
Share on other sites

Can anybody help me with this problem. Basically I have 2 tables clients and addresses, I am trying to get rid of the scroll bar in a portal on the clients_anchor table, and instead use radio buttons to select the record in the portal.

 

I am confused... Which "scroll bar" are you referring to? Do you want to put an additional field in the portal defined with a "Yes" or "No" radio button? Where are the records with the radio buttons (if not in the portal)?

Link to comment
Share on other sites

Hello,

 

Thanks for the reply,sorry if it´s confusing. On the clients table I have a portal which contains addresses what I don´t like is the vertical scroll bar that you use to view the addresses. So what I have done is set up a value list that uses values based on the address ID from the address table, then I set up a relationship from the address ID in the addresses table to the field that the value list is based on in the clients table.

 

The problem I am having is getting the scripts to work properly as I mentioned before, if you take a look at the file it should make more sense.

 

Thanks again

 

James

Link to comment
Share on other sites

. On the clients table I have a portal which contains addresses what I don´t like is the vertical scroll bar that you use to view the addresses.

 

 

Highlight the portal (large area, not just the portal fields). Right click --> Portal Setup --> Unclick the vertical scrolling check box.

Link to comment
Share on other sites

Hello,

 

Eventually I will switch off the vertical scroll bar, but this is not the problem. I am trying to emulate what the scroll bar does but with radio buttons so that when you click a radio button it shows you the elevent address. I have this working, it is the scripts that I mentioned in the first post I am having the problem with,

 

"when you select add address to the portal the new radio button appears but it doesnt go to the new radio button and when you delete an address the radio button disappears but I can´t get it to select the next record."

 

Thanks

 

James

Link to comment
Share on other sites

Hmmmm...seems like a strange way to navigate a portal.

 

Anyway, you need to control the addition and deletion of the related portal records. In the process, you need to tell the field (with the radio buttons) what it needs to be set to.

 

If you duplicate the field and make it simply an Edit box, it is easier to see what I mean. Selecting a radio button just changes the value of the field.

 

Example, Radio button set [Red, Green, Blue]. Selecting the Red option sets the field value to "Red", and if the Blue option it sets it to "Blue".

 

Ok...with that said (don't take it personal if you already knew that, just covering all the bases)...

 

  • in your script to add a related record, you need grab the address ID (or whatever field you are using for the value list), go back to your original layout, and Set the Radio button field to that value.
  • when deleting, you can just delete the portal row, then set the radio field to whatever value represents the next record. Possibly: before you delete the portal row grab the row number with Get(PortalRowNumber) by setting a variable, then delete the portal row, Go to Object (the portal), Go to Portal Row (set by calculation using the previously set variable).

Link to comment
Share on other sites

Hi Thanks for the reply, this is just what I was after. I am new to this so I really appreciate the explination.

 

I have been puzzling over multiple addresses for a while and not found a solution I am really happy with so I thought I would give this one a try. The reason for the radio buttons is that I only wanted to display one address at a time and if you wanted to see the last address you would have to scroll through all the addresses, using radio buttons this becomes instant. Another reason is it also selects the address at the same time.

 

Thanks again for the help

 

James

Link to comment
Share on other sites

See this sample---

 

I think this is what you want to do. Go to last layout (Main Page Copy) to see the way the portals are managed.

Link to comment
Share on other sites

Hi Techphan,

 

Thanks for doing this, it´s really interesting and clearly shows whats going it will be really useful to my solution.

 

Thanks again for taking the time out to help.

 

James

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use