Custom PopupMenu displays menu items as values instead of labels

I’m trying to create custom appearance for PopupMenu with the below code. The problem I have is with the menu items which are displayed as values instead of labels.

How to create appearance of PopupMenu which looks like the screenshot below, but works the same way as PopupMenu with default appearance, and has the same properties such that it is highlighted in blue when the mouse is hovered over it?

PopupMenu[  Dynamic[popupSelection], {val1 -> "L1", val2 -> "L2", val3 -> "L3"}, popupSelection,   Row[{Dynamic[popupSelection], Spacer[3], Style["\[DownPointer]", 20]}]] 

enter image description here

Cross-posted on Wolfram Community

When fetching list’s items the link of title column is missing

I wrote a spfx web part using sp-pnp-js to fetch items from a list, this is my query to the list:

public async getAgreements(): Promise<Agreement[]> {     let select = '*';      let Agreements: Agreement[] = [];      const items = await sp.web.lists.getById('ID_OF_THE_LIST').items       .select(select)       .get();      items.forEach(item => {         Agreements.push({             AgreementName: item.Title,             CustomerAgreementNr: item.CustomerAgreementNr          });     });      return new Promise<Agreement[]>(async(resolve) => {         resolve(Agreements);     });   } 

In the SharePoint list I changed the display name of the title column to AgreementName so when I want to render the list in the web part I use AgreementName. To render the list I am using ListView and IViewField and it looks like this:

export default class AgreementContainer extends React.Component<IAgreementContainerProps, IAgreementContainerState> { constructor(props: IAgreementContainerProps) {     super(props);      this.state = {         agreements: []     } };  private viewFields: IViewField[] = [     {         name: "AgreementName",         linkPropertyName: "AgreementName.ServerRelativeUrl",         displayName: "Agreement Name",         maxWidth: 25,         minWidth: 25,         sorting: true,         isResizable: true       },       {         name: "CustomerAgreementNr",         displayName: "Customer Agreement Nr",         maxWidth: 4,         isResizable: true       } ]  public componentDidMount(): void {     this.props.provider.getAgreements().then((agreements) => {         this.setState({             agreements: agreements         });     });  }  public render(): JSX.Element {     console.log(this.state.agreements);     return (         <div className={ styles.agreementDatabase }>         <ListView              items = {this.state.agreements}             viewFields={this.viewFields}         />         </div>       ); } 

}

But the result for the AgreementName column is just an empty a-tag with a tabindex attribute:

<a tabindex="-1">Agreement</a> 

I have tested with the internal name instead (Title) but the result is the same. How can I fetch the link in order to link the item name?

And a last question, there are date columns too in the list and when they gets rendered the date is in this format: 2019-03-26T13:00:00Z , is there a way to convert the date to a friendly format? something like 2019-03-26 ?

Best regards, Americo

How to show important items at the top in an ordered data table

I am creating an application for a client, it’s essentially a large data table with many rows that they use to monitor the status of systems (each row is a different system). Some of the columns track when the system needs a person to physically go and attend to that system, failure to check the system when indicated to do so would be catastrophic and so the indication to do so has to be clear and always visible. The client has specified this information must be presented in a sortable data table.

I feel like the best way to present the important items so they are visible at all times is to move these rows to the top of the table when they require user action (e.g. someone to go and physically conduct the system check), there will only ever be a maximum of 2 or 3 rows that need checking at any given time.

The issue I’m struggling with is how to show that these rows are not being included in the table sort. For example, if the table is sorted by System Name – Alphabetically, but the top two rows are important, so System X and System Z are shown before System A.

I could show a visible cue, like when you freeze a table in Excel:

example 1

But I feel like that might not be a strong enough visual clue – especially as in Excel, the columns would still obey the table sort, they would just be froze to the top.

Or I could perhaps use two tables on top of each other:

example 2

Although, I feel this is much less elegant, and my client is incredibly twitchy about vertical space. I’m also not sure this is any more intuitive than the first example.

Does any one know of a way this has already been achieved elsewhere? or suggest how I might handle this type of situation?

Note: The above screens are incredibly simplified version of the actual tables, which are 12 columns, 5 of those columns are related to a different check on the systems.

Copy data validation “list of items” from one sheet to another?

On one sheet I have a column that uses “list of items” data validation which allows for a drop down menu to extend and a multiple of options to be selected.

Is there a way to automatically populate the same relative column in sheet two with the items selected in the column in sheet 1?

For example if “Dogs” is selected in Sheet1 A1, then it would automatically populate Sheet2 A1 with “Dogs”.

Thanks in advance!

How to add guest cart Items into customer cart

I need to add guest cart items to customer cart. I can’t save guest token in localstorage which changes when page load.

var data = null;  var xhr = new XMLHttpRequest(); xhr.withCredentials = true;  xhr.addEventListener("readystatechange", function () {   if (this.readyState === 4) {      localStorage.setItem('gT', JSON.parse(JSON.parse(JSON.stringify(this.responseText.toString()))));   } });  xhr.open("POST", "http://site/rest/V1/guest-carts"); xhr.setRequestHeader("cache-control", "no-cache"); xhr.setRequestHeader("postman-token", "a6952066-8198-a910-c581-9525904754e9");  xhr.send(data); } 

This token cannot be save constantly. Anyone please help me to convert guest cart to customer cart.

Best UI for items with assigned percentage

I want to get my user to create a list of items. Then each item in that list needs to have a percentage assigned to it. The tricky part is that the percentages need to add up to 100%. So let’s say the app is about customising a pizza top. The user will add items like so: onion 5%, cheese 45%, tomato 10% & mushroom 40%.

At the beginning the list is empty. So the first item will be 100% of the mix. I can deduct whatever percentage the user chooses for the second item from 100. But for the third and fourth items it gets difficult as I’m not sure which item I should deduct the item percentage from. Also there’s a chance that the user wants to edit the percentages after assigning.

What’s the best approach to this?

How can I set up USPS Shipping to have options given only if a certain amount of items are being checked out?

How can I set up USPS Shipping to have options given only if a certain amount of items are being checked out?

I’m using USPS for shipping and I want it to use a small flat rate box if there are lets say 5 items in the cart. Then, if there are more than 5 it would only give the option of medium flat rate box. Then finally, more than 10 a large flat rate box. How could I set the USPS shipping on magento to do this?

I’m on base Magento 2.3

How does an AB Weird Science recreate their Trapping items if lost/destroyed?

How does an AB Weird Science recreate their Trapping items if they are lost or destroyed?

P.148 says they must always use their item … A weird scientist’s Trappings (see page 150) must always include the item they’re associated with. 

Then the example on p.149 in Jury Rigging shows them being able to use a power, albeit at the -2, after the item is lost … Gabe is captured by evil aliens and all his equipment is taken. He’s placed in a holding cell and decides he’ll use the overhead lights and whatever the aliens use for electricity to create a makeshift blast. 

But how does Gabe ever recreate his item?